X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGLViewer%2FGLViewer_Group.cxx;h=d4fc449f98c95afbd89414afb20dacd2ba164124;hb=3b3dce973acb7299499dd3527ded627940516ab3;hp=3adf4d9a2703c68526daeacef0609fe0f81f7042;hpb=2e750f9ded92337bc3c44e9d7388180974cc4a43;p=modules%2Fgui.git diff --git a/src/GLViewer/GLViewer_Group.cxx b/src/GLViewer/GLViewer_Group.cxx index 3adf4d9a2..d4fc449f9 100644 --- a/src/GLViewer/GLViewer_Group.cxx +++ b/src/GLViewer/GLViewer_Group.cxx @@ -2,6 +2,7 @@ // Created: March, 2005 // Author: OCC team // Copyright (C) CEA 2005 + //#include "GLViewerAfx.h" #include "GLViewer_Group.h" #include "GLViewer_Object.h" @@ -106,23 +107,26 @@ int GLViewer_Group::removeObject( GLViewer_Object* theObject ) //Function: dragingObjects //Description: //-------------------------------------------------------------------------- -void GLViewer_Group::dragingObjects( float x, float y ) +void GLViewer_Group::dragingObjects( float x, float y, bool once ) { - if( !mySelObjNum ) + if( !once ) { - OGIterator it = myList.begin(); - OGIterator end_it = myList.end(); - for( int i = 0; it != end_it; ++it, i++ ) - if( (*it)->isSelected() ) - mySelObjNum++; + if( !mySelObjNum ) + { + OGIterator it = myList.begin(); + OGIterator end_it = myList.end(); + for( int i = 0; it != end_it; ++it, i++ ) + if( (*it)->isSelected() ) + mySelObjNum++; - if( mySelObjNum ) + if( mySelObjNum ) + mySelObjNum--; + } + else + { mySelObjNum--; - } - else - { - mySelObjNum--; - return; + return; + } } OGIterator it = myList.begin(); @@ -143,6 +147,6 @@ void GLViewer_Group::updateZoom( GLViewer_Object* sender, float zoom ) { GLViewer_Object* anObject = *it; if( anObject != sender ) - anObject->setZoom( zoom, GL_TRUE ); + anObject->setZoom( zoom, true, true ); } }