]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
refs #78 - reported by Hervé Legrand: do not create segment if mouse moved out of...
authornds <natalia.donis@opencascade.com>
Mon, 2 Jun 2014 06:04:57 +0000 (10:04 +0400)
committernds <natalia.donis@opencascade.com>
Mon, 2 Jun 2014 06:04:57 +0000 (10:04 +0400)
Accept any key to set the second point in order to apply the line creation even if the "Enter" has not been pressed in the second point widget
It is right, for the current version, that the "Tab" emulates to the second point selection in the viewer.

src/PartSet/PartSet_OperationSketchLine.cpp

index 4ca7d3200991b2acfa7782b722b84f3e8e15cce5..1a1cdbc0ea420b3442860cd9a40f1b9c8c520415 100644 (file)
@@ -209,7 +209,8 @@ void PartSet_OperationSketchLine::mouseMoved(QMouseEvent* theEvent, Handle(V3d_V
 void PartSet_OperationSketchLine::keyReleased(std::string theName, QKeyEvent* theEvent)
 {
   int aKeyType = theEvent->key();
-  if (!theName.empty() && aKeyType == Qt::Key_Return) {
+  // the second point should be activated by any modification in the property panel
+  if (!theName.empty() /*&& aKeyType == Qt::Key_Return*/) {
     if (theName == LINE_ATTR_START) {
       setPointSelectionMode(SM_SecondPoint, false);
     }