]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Remove storing/restoring selection from dumpView() - this should be done at the highe...
authorouv <ouv@opencascade.com>
Mon, 28 Feb 2011 11:20:17 +0000 (11:20 +0000)
committerouv <ouv@opencascade.com>
Mon, 28 Feb 2011 11:20:17 +0000 (11:20 +0000)
src/GraphicsView/GraphicsView_ViewPort.cxx
src/GraphicsView/GraphicsView_ViewPort.h

index 2258de9c20788b7d0bf2889eb29f7005373fdbbd..daa1b70878d274dc3c11afd3a482a096ce443e7a 100644 (file)
@@ -301,25 +301,12 @@ QImage GraphicsView_ViewPort::dumpView( bool theWholeScene )
   if( aRect.isNull() )
     return QImage();
 
-  // store a list of selected objects
-  GraphicsView_ObjectList aSelectedObjects = mySelectedObjects;
-
-  // unhighlight and unselect all objects
-  clearHighlighted();
-  clearSelected();
-
   // render the scene to an image
   QImage anImage( aRect.toRect().size(), QImage::Format_RGB32 );
   QPainter aPainter( &anImage );
   QRectF aTargetRect( 0, 0, aRect.width(), aRect.height() );
   myScene->render( &aPainter, aTargetRect, aRect );
 
-  // restore selection
-  GraphicsView_ObjectListIterator aSelectedIter( aSelectedObjects );
-  while( aSelectedIter.hasNext() )
-    if( GraphicsView_Object* anObject = aSelectedIter.next() )
-      setSelected( anObject );
-
   return anImage;
 }
 
index 45a0ce15be04c0964ad3054cb91acc3ebbd25ec8..59b1f61bb2f22bc5ebf630728d40ba41875fa315 100644 (file)
@@ -142,6 +142,9 @@ public:
   bool                             nextSelected();
   GraphicsView_Object*             selectedObject();
 
+  const GraphicsView_ObjectList&   getSelectedObjects() const { return mySelectedObjects; }
+
+
   // rectangle selection
   void                             startSelectByRect( int x, int y );
   void                             drawSelectByRect( int x, int y );