myIsInternalEditOperation = true;
// activate selection filters of the first widget in the viewer
- onInternalActivateFirstWidgetSelection();
+ onWidgetActivated();
// activate the last active widget in the Property Panel
if (!myPreviousAttributeID.empty()) {
SessionPtr aMgr = ModelAPI_Session::get();
if (aMgr->hasModuleDocument() && aMgr->canUndo()) {
aMgr->undo();
+ workshop()->operationMgr()->updateApplyOfOperations();
+ workshop()->updateCommandStatus();
}
}
myIsInternalEditOperation = false;
PartSet_WidgetPoint2D* aPoint2DWdg = dynamic_cast<PartSet_WidgetPoint2D*>(module()->activeWidget());
if (aPoint2DWdg && aPoint2DWdg->canBeActivatedByMove()) {
ModuleBase_Operation* anOperation = myWorkshop->currentOperation();
- //if (operationMgr()->isApplyEnabled())
anOperation->commit();
aProcessed = true;
}
if (myIsInternalEditOperation) {
ModuleBase_Operation* anOperation = myWorkshop->currentOperation();
- //if (operationMgr()->isApplyEnabled())
- anOperation->commit();
- aProcessed = true;
- // fill the widget by the mouse event point
- PartSet_WidgetPoint2D* aPoint2DWdg = dynamic_cast<PartSet_WidgetPoint2D*>(module()->activeWidget());
- if (aPoint2DWdg) {
- aPoint2DWdg->onMouseRelease(theWnd, theEvent);
+ ModuleBase_ModelWidget* anActiveWidget = anOperation->propertyPanel()->activeWidget();
+ if (!anActiveWidget || !anActiveWidget->isViewerSelector()) {
+ anOperation->commit();
+ aProcessed = true;
+
+ // fill the widget by the mouse event point
+ PartSet_WidgetPoint2D* aPoint2DWdg = dynamic_cast<PartSet_WidgetPoint2D*>(module()->activeWidget());
+ if (aPoint2DWdg) {
+ aPoint2DWdg->onMouseRelease(theWnd, theEvent);
+ }
}
}
}
}
-void PartSet_SketcherReetntrantMgr::noMoreWidgets(const std::string& thePreviousAttributeID)
+void PartSet_SketcherReetntrantMgr::onNoMoreWidgets(const std::string& thePreviousAttributeID)
{
if (!isActiveMgr())
return;
}
}
-void PartSet_SketcherReetntrantMgr::vertexSelected()
+void PartSet_SketcherReetntrantMgr::onVertexSelected()
{
if (!isActiveMgr())
return;
return !isActiveMgr() || myRestartingMode == RM_None;
}
-void PartSet_SketcherReetntrantMgr::onInternalActivateFirstWidgetSelection()
+void PartSet_SketcherReetntrantMgr::onWidgetActivated()
{
if (!isActiveMgr())
return;