if (!isActiveMgr() || !myIsInternalEditOperation)
return;
- ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
- (myWorkshop->currentOperation());
- if (aFOperation) {
- disconnect(aFOperation, SIGNAL(beforeCommitted()), this, SLOT(onBeforeStopped()));
- disconnect(aFOperation, SIGNAL(beforeAborted()), this, SLOT(onBeforeStopped()));
- }
-
- PartSet_Module* aModule = module();
- ModuleBase_ModelWidget* aFirstWidget = aModule->activeWidget();
- ModuleBase_IPropertyPanel* aPanel = aModule->currentOperation()->propertyPanel();
- if (aFirstWidget != aPanel->activeWidget()) {
- ModuleBase_WidgetSelector* aWSelector = dynamic_cast<ModuleBase_WidgetSelector*>(aFirstWidget);
- if (aWSelector)
- aWSelector->activateSelectionAndFilters(false);
- }
+ beforeStopInternalEdit();
}
bool PartSet_SketcherReetntrantMgr::canBeCommittedByPreselection()
}
}
+void PartSet_SketcherReetntrantMgr::beforeStopInternalEdit()
+{
+ ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
+ (myWorkshop->currentOperation());
+ if (aFOperation) {
+ disconnect(aFOperation, SIGNAL(beforeCommitted()), this, SLOT(onBeforeStopped()));
+ disconnect(aFOperation, SIGNAL(beforeAborted()), this, SLOT(onBeforeStopped()));
+ }
+
+ PartSet_Module* aModule = module();
+ ModuleBase_ModelWidget* aFirstWidget = aModule->activeWidget();
+ ModuleBase_IPropertyPanel* aPanel = aModule->currentOperation()->propertyPanel();
+ if (aFirstWidget != aPanel->activeWidget()) {
+ ModuleBase_WidgetSelector* aWSelector = dynamic_cast<ModuleBase_WidgetSelector*>(aFirstWidget);
+ if (aWSelector)
+ aWSelector->activateSelectionAndFilters(false);
+ }
+}
+
void PartSet_SketcherReetntrantMgr::restartOperation()
{
if (myIsInternalEditOperation) {
/// \param thePreviousAttributeID an index of the previous attribute to set focus to this widget
void startInternalEdit(const std::string& thePreviousAttributeID);
+ /// Disconnects this manager from operation signals, deactivate selection of the first control
+ /// in the viewer.
+ void beforeStopInternalEdit();
+
/// Commits the current operation and launches a new with the commited operation feature index
void restartOperation();