]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
updateBorders() method has been corrected - to solve problems with FitAll transformation
authorouv <ouv@opencascade.com>
Tue, 2 Sep 2008 11:55:37 +0000 (11:55 +0000)
committerouv <ouv@opencascade.com>
Tue, 2 Sep 2008 11:55:37 +0000 (11:55 +0000)
startOperations( QWheelEvent* ) method has been corrected - to allow axial zooming

src/GLViewer/GLViewer_Viewer2d.cxx

index f6f998697277020392f16b75fe90b4407acdec4d..eaa41fb39faddbdabb6eb6ba64d25f9fd0bb7f0a 100644 (file)
@@ -178,7 +178,7 @@ void GLViewer_Viewer2d::updateBorders()
         {
             GLViewer_Object* anObject = *it;
             GLViewer_Rect* aRect = anObject->getRect();
-            if( !anObject->isSelectable() || !anObject->getVisible() )
+            if( !anObject->isScalable() || !anObject->getVisible() )
                 continue;
 
             if( border->isEmpty() )
@@ -1006,7 +1006,10 @@ void GLViewer_Viewer2d::startOperations( QWheelEvent* e )
     for( myGLContext->InitSelected(); myGLContext->MoreSelected(); myGLContext->NextSelected() )
     {
         GLViewer_Object* anObject = myGLContext->SelectedObject();
-        update = anObject->updateZoom( zoomIn ) || update;
+        if( e->modifiers() & Qt::ControlModifier )
+          update = anObject->updateXZoom( zoomIn ) || update;
+        else
+          update = anObject->updateZoom( zoomIn ) || update;
     }
 
     emit wheelZoomChange( zoomIn );