"Esc" key release leads to stop any operation.
void PartSet_OperationSketchBase::mouseMoved(QMouseEvent* theEvent, Handle(V3d_View) theView)
{
}
+
+void PartSet_OperationSketchBase::keyReleased(const int theKey)
+{
+ switch (theKey) {
+ case Qt::Key_Escape: {
+ abort();
+ }
+ break;
+ default:
+ break;
+ }
+}
/// Processes the key pressed in the view
/// \param theKey a key value
- virtual void keyReleased(const int theKey) {};
+ virtual void keyReleased(const int theKey);
signals:
/// Signal about the feature construing is finished
void PartSet_OperationSketchLine::keyReleased(const int theKey)
{
switch (theKey) {
- case Qt::Key_Escape: {
- abort();
- }
- break;
case Qt::Key_Return: {
abort();
emit launchOperation(PartSet_OperationSketchLine::Type(), boost::shared_ptr<ModelAPI_Feature>());
}
break;
default:
+ PartSet_OperationSketchBase::keyReleased(theKey);
break;
}
}