return;
#endif
+ if (canChangeCursor(getCurrentOperation()))
+ QApplication::setOverrideCursor(QCursor(Qt::CrossCursor));
+
if (!isNestedCreateOperation(getCurrentOperation()))
return;
- QApplication::setOverrideCursor(QCursor(Qt::CrossCursor));//QIcon(":pictures/button_plus.png").pixmap(20,20)));
-
operationMgr()->onValidateOperation();
// we need change displayed state of the current operation feature
return;
#endif
+ if (canChangeCursor(getCurrentOperation()))
+ QApplication::restoreOverrideCursor();
+
if (!isNestedCreateOperation(getCurrentOperation()))
return;
- QApplication::restoreOverrideCursor();
-
// the method should be performed if the popup menu is called,
// the reset of the current widget should not happen
if (myIsPopupMenuActive)
void PartSet_SketcherMgr::startNestedSketch(ModuleBase_Operation* theOperation)
{
- if (isNestedCreateOperation(theOperation) && myIsMouseOverWindow)
- QApplication::setOverrideCursor(QCursor(Qt::CrossCursor));//QIcon(":pictures/button_plus.png").pixmap(20,20)));
+ if (canChangeCursor(theOperation) && myIsMouseOverWindow)
+ QApplication::setOverrideCursor(QCursor(Qt::CrossCursor));
}
-void PartSet_SketcherMgr::stopNestedSketch(ModuleBase_Operation* theOp)
+void PartSet_SketcherMgr::stopNestedSketch(ModuleBase_Operation* theOperation)
{
myIsMouseOverViewProcessed = true;
operationMgr()->onValidateOperation();
- if (isNestedCreateOperation(theOp) || myModule->sketchReentranceMgr()->isInternalEditActive())
+ if (canChangeCursor(theOperation))
QApplication::restoreOverrideCursor();
}
return aCanDisplay;
}
+bool PartSet_SketcherMgr::canChangeCursor(ModuleBase_Operation* theOperation) const
+{
+ return isNestedCreateOperation(theOperation) ||
+ myModule->sketchReentranceMgr()->isInternalEditActive();
+}
+
bool PartSet_SketcherMgr::isObjectOfSketch(const ObjectPtr& theObject) const
{
bool isFoundObject = false;
/// \return boolean result
bool canDisplayCurrentCreatedFeature() const;
+ /// Returns true if the current operation is nested creation or internal reentrant edit
+ /// \param theOperation an operation
+ bool canChangeCursor(ModuleBase_Operation* theOperation) const;
+
/// Returns state of constraints showing flag
bool isConstraintsShown() const { return myIsConstraintsShown; }