Refrefresh diagramview

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3289 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2014-08-24 03:36:38 +00:00
parent 8b352982e9
commit e2debaefa3

View File

@@ -352,6 +352,9 @@ void DiagramView::zoomIn() {
*/ */
void DiagramView::zoomOut() { void DiagramView::zoomOut() {
scale(0.75, 0.75); scale(0.75, 0.75);
if ((mapFromScene(0,0).rx() == 0) && (mapFromScene(0,0).ry() == 0)){
fitInView(sceneRect(), Qt::KeepAspectRatio);
}
adjustGridToZoom(); adjustGridToZoom();
} }
@@ -590,10 +593,10 @@ void DiagramView::wheelEvent(QWheelEvent *e) {
#else #else
if (!(e -> modifiers() & Qt::ControlModifier)) { if (!(e -> modifiers() & Qt::ControlModifier)) {
if (e -> delta() > 0){ if (e -> delta() > 0){
zoomInSlowly(); zoomIn();
} }
else{ else{
zoomOutSlowly(); zoomOut();
} }
} }
else { else {