]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Process Enter key in edit sketch operation
authorvsv <vitaly.smetannikov@opencascade.com>
Mon, 28 Jul 2014 15:30:39 +0000 (19:30 +0400)
committervsv <vitaly.smetannikov@opencascade.com>
Mon, 28 Jul 2014 15:30:39 +0000 (19:30 +0400)
src/PartSet/PartSet_OperationFeatureEdit.cpp
src/PartSet/PartSet_OperationFeatureEdit.h

index f3e4b2dbe69cc415b1d8a8bc61383f2d83d4875c..1a6fb55aaed07271807856e7702683e7aa41fa3b 100644 (file)
@@ -162,6 +162,15 @@ void PartSet_OperationFeatureEdit::mouseDoubleClick(QMouseEvent* theEvent, Handl
   }
 }
 
+
+void PartSet_OperationFeatureEdit::keyReleased(const int theKey)
+{
+  if (theKey == Qt::Key_Return) {
+    commit();
+  } else 
+    PartSet_OperationSketchBase::keyReleased(theKey);
+}
+
 void PartSet_OperationFeatureEdit::startOperation()
 {
   PartSet_OperationSketchBase::startOperation();
index f893a964e7b99d917ab11087f3dd8f8d73276ae9..ac607e47f873c310a72ebf1e4f963841ed13c504 100644 (file)
@@ -106,6 +106,11 @@ public:
   virtual void mouseDoubleClick(QMouseEvent* theEvent, Handle_V3d_View theView,
                                 const std::list<ModuleBase_ViewerPrs>& theSelected,
                                 const std::list<ModuleBase_ViewerPrs>& theHighlighted);
+
+  /// Processes the key pressed in the view
+  /// \param theKey a key value
+  virtual void keyReleased(const int theKey);
+
 protected:
   /// \brief Virtual method called when operation is started
   /// Virtual method called when operation started (see start() method for more description)