]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Sketching.
authorouv <ouv@opencascade.com>
Tue, 9 Jul 2013 08:40:20 +0000 (08:40 +0000)
committerouv <ouv@opencascade.com>
Tue, 9 Jul 2013 08:40:20 +0000 (08:40 +0000)
src/GraphicsView/GraphicsView_ViewPort.cxx

index 9b2aa85acb7dd17a83e89b1b8b66793bc1675938..3ce7a51998e6b22a81d2eeef87684841e12bde0f 100644 (file)
@@ -1401,7 +1401,7 @@ void GraphicsView_ViewPort::drawSketching( const QPointF& thePoint )
 //================================================================
 void GraphicsView_ViewPort::finishSketching( bool theStatus )
 {
-  prepareToSketch( false ); // just in case
+  prepareToSketch( false );
 
   mySketchingItem->setVisible( false );
   myIsSketching = false;
@@ -1594,6 +1594,12 @@ bool GraphicsView_ViewPort::cancelCurrentOperation()
     return true;
   }
 
+  if( isSketching() || isPrepareToSketch() )
+  {
+    finishSketching( false );
+    return true;
+  }
+
   return false;
 }