From: nds Date: Thu, 15 Oct 2015 15:35:44 +0000 (+0300) Subject: Value state is provided in ModelWidget to remove 'myIsCurrentValueUnderModification... X-Git-Tag: V_2.0.0_alfa1~56 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cee771b5b59162bd91aa69a3a737a79b1905d866;p=modules%2Fshaper.git Value state is provided in ModelWidget to remove 'myIsCurrentValueUnderModification' in sketch manager. Reason: Apply button should be disabled during value modification for any operation, not only Sketch. --- diff --git a/src/ModuleBase/ModuleBase_IModule.cpp b/src/ModuleBase/ModuleBase_IModule.cpp index fb973e591..4e1718da3 100644 --- a/src/ModuleBase/ModuleBase_IModule.cpp +++ b/src/ModuleBase/ModuleBase_IModule.cpp @@ -228,7 +228,7 @@ bool ModuleBase_IModule::canActivateSelection(const ObjectPtr& theObject) const return !aFOperation || !aFOperation->hasObject(theObject); } -void ModuleBase_IModule::onOperationResumed(ModuleBase_Operation* theOperation) +void ModuleBase_IModule::operationResumed(ModuleBase_Operation* theOperation) { - emit operationResumed(theOperation); + emit resumed(theOperation); } diff --git a/src/ModuleBase/ModuleBase_IModule.h b/src/ModuleBase/ModuleBase_IModule.h index a32b0224c..78e68b550 100644 --- a/src/ModuleBase/ModuleBase_IModule.h +++ b/src/ModuleBase/ModuleBase_IModule.h @@ -61,21 +61,21 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject /// Realizes some functionality by an operation start /// \param theOperation a started operation - virtual void onOperationStarted(ModuleBase_Operation* theOperation) {} + virtual void operationStarted(ModuleBase_Operation* theOperation) {} /// Realizes some functionality by an operation resume /// By default it emits operationResumed signal /// \param theOperation a resumed operation - virtual void onOperationResumed(ModuleBase_Operation* theOperation); + virtual void operationResumed(ModuleBase_Operation* theOperation); /// Realizes some functionality by an operation stop - virtual void onOperationStopped(ModuleBase_Operation* theOperation) {} + virtual void operationStopped(ModuleBase_Operation* theOperation) {} /// Realizes some functionality by an operation commit - virtual void onOperationCommitted(ModuleBase_Operation* theOperation) {} + virtual void operationCommitted(ModuleBase_Operation* theOperation) {} /// Realizes some functionality by an operation abort - virtual void onOperationAborted(ModuleBase_Operation* theOperation) {} + virtual void operationAborted(ModuleBase_Operation* theOperation) {} /// Realizes some functionality by an operation start virtual ModuleBase_Operation* currentOperation() const = 0; @@ -197,7 +197,7 @@ signals: /// Segnal emitted when an operation is resumed /// \param theOp a resumed operation - void operationResumed(ModuleBase_Operation* theOp); + void resumed(ModuleBase_Operation* theOp); public slots: /// Called on call of command corresponded to a feature diff --git a/src/ModuleBase/ModuleBase_ModelWidget.cpp b/src/ModuleBase/ModuleBase_ModelWidget.cpp index 87d490d88..b094366d5 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.cpp +++ b/src/ModuleBase/ModuleBase_ModelWidget.cpp @@ -27,7 +27,8 @@ ModuleBase_ModelWidget::ModuleBase_ModelWidget(QWidget* theParent, const std::string& theParentId) : QWidget(theParent), myParentId(theParentId), - myIsEditing(false) + myIsEditing(false), + myState(Stored) { myDefaultValue = theData->getProperty(ATTR_DEFAULT); myUseReset = theData->getBooleanAttribute(ATTR_USE_RESET, true); @@ -36,6 +37,7 @@ ModuleBase_ModelWidget::ModuleBase_ModelWidget(QWidget* theParent, myIsObligatory = theData->getBooleanAttribute(ATTR_OBLIGATORY, true); connect(this, SIGNAL(valuesChanged()), this, SLOT(onWidgetValuesChanged())); + connect(this, SIGNAL(valuesModified()), this, SLOT(onWidgetValuesModified())); } bool ModuleBase_ModelWidget::isInitialized(ObjectPtr theObject) const @@ -132,6 +134,8 @@ void ModuleBase_ModelWidget::setDefaultValue(const std::string& theValue) bool ModuleBase_ModelWidget::storeValue() { + setValueState(Stored); + emit beforeValuesChanged(); bool isDone = storeValueCustom(); emit afterValuesChanged(); @@ -139,6 +143,15 @@ bool ModuleBase_ModelWidget::storeValue() return isDone; } +void ModuleBase_ModelWidget::setValueState(const ValueState& theState) +{ + if (myState == theState) + return; + + myState = theState; + emit valueStateChanged(); +} + bool ModuleBase_ModelWidget::restoreValue() { emit beforeValuesRestored(); @@ -205,6 +218,12 @@ void ModuleBase_ModelWidget::onWidgetValuesChanged() storeValue(); } +//************************************************************** +void ModuleBase_ModelWidget::onWidgetValuesModified() +{ + setValueState(Modified); +} + //************************************************************** void ModuleBase_ModelWidget::blockUpdateViewer(const bool theValue) { diff --git a/src/ModuleBase/ModuleBase_ModelWidget.h b/src/ModuleBase/ModuleBase_ModelWidget.h index dd60b1664..edfd1bec2 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.h +++ b/src/ModuleBase/ModuleBase_ModelWidget.h @@ -33,7 +33,12 @@ class MODULEBASE_EXPORT ModuleBase_ModelWidget : public QWidget { Q_OBJECT public: - /// Constructor + /// State of the widget + enum ValueState { Stored, /// modification is finished and applyed to the model + Modified /// modification has not been finished and set to the model yet + }; + + /// Constructor /// \param theParent the parent object /// \param theData the widget configuration. The attribute of the model widget is obtained from /// \param theParentId is Id of a parent of the current attribute @@ -70,6 +75,10 @@ Q_OBJECT /// \return the boolean result bool isUseReset() const { return myUseReset; } + /// Returns this widget value state + /// \return the enumeration result + ValueState getValueState() const { return myState; } + /// Defines if it is supposed that the widget should interact with the viewer. virtual bool isViewerSelector() { return false; } @@ -189,6 +198,9 @@ signals: /// \param theWidget the model base widget void focusOutWidget(ModuleBase_ModelWidget* theWidget); + /// The signal about value state modification + void valueStateChanged(); + protected: /// Sets default value of widget. Normally, widget should fetch this value /// from the xml. However, some widgets derived widgets could define it @@ -200,6 +212,10 @@ protected: myAttributeID = theAttribute; } + /// Sets the current value state. If the value is changed, the signal is emitted + /// \param theState a new state + void setValueState(const ValueState& theState); + /// Saves the internal parameters to the given feature. Emits signals before and after store /// \return True in success bool storeValue(); @@ -222,6 +238,9 @@ protected slots: /// Processing of values changed in model widget by store the current value to the feature void onWidgetValuesChanged(); + /// Changes widget state. + void onWidgetValuesModified(); + protected: /// The attribute name of the model feature @@ -240,6 +259,9 @@ protected slots: /// The non-obligatory widgets should not accept the focus in the property panel bool myIsObligatory; + /// The widget value state + ValueState myState; + private: /// Value should be computed on execute, like radius for circle's constraint (can not be zero) bool myIsComputedDefault; diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index e9fda30ce..70c741069 100755 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -246,7 +246,7 @@ void PartSet_Module::registerProperties() Config_Prop::Integer, SKETCH_WIDTH); } -void PartSet_Module::onOperationCommitted(ModuleBase_Operation* theOperation) +void PartSet_Module::operationCommitted(ModuleBase_Operation* theOperation) { if (PartSet_SketcherMgr::isNestedSketchOperation(theOperation)) { mySketchMgr->commitNestedSketch(theOperation); @@ -283,12 +283,12 @@ void PartSet_Module::breakOperationSequence() myRestartingMode = RM_None; } -void PartSet_Module::onOperationAborted(ModuleBase_Operation* theOperation) +void PartSet_Module::operationAborted(ModuleBase_Operation* theOperation) { breakOperationSequence(); } -void PartSet_Module::onOperationStarted(ModuleBase_Operation* theOperation) +void PartSet_Module::operationStarted(ModuleBase_Operation* theOperation) { if (PartSet_SketcherMgr::isSketchOperation(theOperation)) { mySketchMgr->startSketch(theOperation); @@ -302,16 +302,16 @@ void PartSet_Module::onOperationStarted(ModuleBase_Operation* theOperation) myCustomPrs->activate(aFOperation->feature(), true); } -void PartSet_Module::onOperationResumed(ModuleBase_Operation* theOperation) +void PartSet_Module::operationResumed(ModuleBase_Operation* theOperation) { - ModuleBase_IModule::onOperationResumed(theOperation); + ModuleBase_IModule::operationResumed(theOperation); ModuleBase_OperationFeature* aFOperation = dynamic_cast(theOperation); if (aFOperation) myCustomPrs->activate(aFOperation->feature(), true); } -void PartSet_Module::onOperationStopped(ModuleBase_Operation* theOperation) +void PartSet_Module::operationStopped(ModuleBase_Operation* theOperation) { bool isModified = myCustomPrs->deactivate(false); diff --git a/src/PartSet/PartSet_Module.h b/src/PartSet/PartSet_Module.h index f983ca04c..3ff88e6c6 100644 --- a/src/PartSet/PartSet_Module.h +++ b/src/PartSet/PartSet_Module.h @@ -77,27 +77,27 @@ public: /// Displays all sketcher sub-Objects, hides sketcher result, appends selection filters /// Activate the operation presentation /// \param theOperation a started operation - virtual void onOperationStarted(ModuleBase_Operation* theOperation); + virtual void operationStarted(ModuleBase_Operation* theOperation); /// Realizes some functionality by an operation resume /// Activate the operation presentation /// \param theOperation a resumed operation - virtual void onOperationResumed(ModuleBase_Operation* theOperation); + virtual void operationResumed(ModuleBase_Operation* theOperation); /// Realizes some functionality by an operation commit /// Restarts sketcher operation automatically of it is necessary /// \param theOperation a committed operation - virtual void onOperationCommitted(ModuleBase_Operation* theOperation); + virtual void operationCommitted(ModuleBase_Operation* theOperation); /// Realizes some functionality by an operation abort /// Hides all sketcher sub-Objects, displays sketcher result and removes selection filters /// \param theOperation an aborted operation - virtual void onOperationAborted(ModuleBase_Operation* theOperation); + virtual void operationAborted(ModuleBase_Operation* theOperation); /// Realizes some functionality by an operation stop /// Hides all sketcher sub-Objects, displays sketcher result and removes selection filters /// \param theOperation a stopped operation - virtual void onOperationStopped(ModuleBase_Operation* theOperation); + virtual void operationStopped(ModuleBase_Operation* theOperation); /// Returns current operation virtual ModuleBase_Operation* currentOperation() const; diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 1d7a0eaf8..b8374fd4e 100755 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -152,7 +152,7 @@ void getAttributesOrResults(const Handle(SelectMgr_EntityOwner)& theOwner, PartSet_SketcherMgr::PartSet_SketcherMgr(PartSet_Module* theModule) : QObject(theModule), myModule(theModule), myIsDragging(false), myDragDone(false), - myIsResetCurrentValue(false), myIsCurrentValueUnderModification(false), myIsMouseOverWindow(false), + myIsResetCurrentValue(false), myIsMouseOverWindow(false), myIsMouseOverViewProcessed(true), myPreviousUpdateViewerEnabled(true), myIsPopupMenuActive(false), myIsConstraintsShown(true) { @@ -192,7 +192,7 @@ void PartSet_SketcherMgr::onEnterViewPort() // redisplayed before this update, the feature presentation jumps from reset value to current. myIsMouseOverWindow = true; myIsResetCurrentValue = false; - myIsCurrentValueUnderModification = false; + //myIsCurrentValueUnderModification = false; // it is important to validate operation here only if sketch entity create operation is active // because at this operation we reacts to the mouse leave/enter view port //operationMgr()->onValidateOperation(); @@ -261,10 +261,8 @@ void PartSet_SketcherMgr::onLeaveViewPort() // disable the viewer update in order to avoid visualization of redisplayed feature in viewer // obtained after reset value bool isEnableUpdateViewer = aDisplayer->enableUpdateViewer(false); - ModuleBase_Operation* aOperation = getCurrentOperation(); - ModuleBase_IPropertyPanel* aPanel = aOperation->propertyPanel(); - ModuleBase_ModelWidget* aActiveWgt = aPanel->activeWidget(); - if (aActiveWgt && aActiveWgt->reset()) { + ModuleBase_ModelWidget* anActiveWidget = getActiveWidget(); + if (anActiveWidget && anActiveWidget->reset()) { myIsResetCurrentValue = true; } aDisplayer->enableUpdateViewer(isEnableUpdateViewer); @@ -280,20 +278,23 @@ void PartSet_SketcherMgr::onLeaveViewPort() } } -void PartSet_SketcherMgr::onValuesModied() +void PartSet_SketcherMgr::onValueStateChanged() { - myIsCurrentValueUnderModification = true; + ///myIsCurrentValueUnderModification = true; // update Apply enable state //myIsResetCurrentValue = false; //if (!isNestedCreateOperation(getCurrentOperation())) // return; - operationMgr()->onValidateOperation(); + + ModuleBase_ModelWidget* anActiveWidget = getActiveWidget(); + if (anActiveWidget && anActiveWidget->getValueState() != ModuleBase_ModelWidget::Stored) + operationMgr()->onValidateOperation(); } void PartSet_SketcherMgr::onBeforeValuesChangedInPropertyPanel() { myIsResetCurrentValue = false; - myIsCurrentValueUnderModification = false; + //myIsCurrentValueUnderModification = false; if (isNestedCreateOperation(getCurrentOperation())) return; @@ -363,10 +364,9 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE return; if (aFOperation->isEditOperation()) { - ModuleBase_IPropertyPanel* aPanel = aFOperation->propertyPanel(); - ModuleBase_ModelWidget* aActiveWgt = aPanel->activeWidget(); // If the current widget is a selector, do nothing, it processes the mouse press - if(aActiveWgt && aActiveWgt->isViewerSelector()) { + ModuleBase_ModelWidget* anActiveWidget = getActiveWidget(); + if(anActiveWidget && anActiveWidget->isViewerSelector()) { return; } } @@ -485,17 +485,15 @@ void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEve if (isNestedCreateOperation(getCurrentOperation()) && !myIsMouseOverViewProcessed) { myIsMouseOverViewProcessed = true; // 1. perform the widget mouse move functionality and display the presentation - ModuleBase_Operation* aOperation = getCurrentOperation(); - ModuleBase_IPropertyPanel* aPanel = aOperation->propertyPanel(); - ModuleBase_ModelWidget* anActiveWdg = aPanel->activeWidget(); // the mouse move should be processed in the widget, if it can in order to visualize correct // presentation. These widgets correct the feature attribute according to the mouse position - PartSet_WidgetPoint2D* aPoint2DWdg = dynamic_cast(anActiveWdg); + ModuleBase_ModelWidget* anActiveWidget = getActiveWidget(); + PartSet_WidgetPoint2D* aPoint2DWdg = dynamic_cast(anActiveWidget); if (aPoint2DWdg) { aPoint2DWdg->onMouseMove(theWnd, theEvent); } PartSet_WidgetPoint2dDistance* aDistanceWdg = dynamic_cast - (anActiveWdg); + (anActiveWidget); if (aDistanceWdg) { aDistanceWdg->onMouseMove(theWnd, theEvent); } @@ -718,7 +716,7 @@ QString PartSet_SketcherMgr::getFeatureError(const FeaturePtr& theFeature) AttributeStringPtr aAttributeString = aSketch->string(SketchPlugin_Sketch::SOLVER_ERROR()); anError = aAttributeString->value().c_str(); } - else if (myIsResetCurrentValue || myIsCurrentValueUnderModification) { + else if (myIsResetCurrentValue /*|| myIsCurrentValueUnderModification*/) { // this flags do not allow commit of the current operation ModuleBase_OperationFeature* aFOperation = dynamic_cast (getCurrentOperation()); @@ -726,18 +724,27 @@ QString PartSet_SketcherMgr::getFeatureError(const FeaturePtr& theFeature) FeaturePtr aFeature = aFOperation->feature(); if (aFeature.get() && aFeature == theFeature && isNestedCreateOperation(aFOperation)) { QString anAttributeName = ""; - ModuleBase_IPropertyPanel* aPanel = aFOperation->propertyPanel(); - ModuleBase_ModelWidget* anActiveWgt = aPanel->activeWidget(); - if (anActiveWgt) { - AttributePtr anAttr = aFeature->attribute(anActiveWgt->attributeID()); + ModuleBase_ModelWidget* anActiveWidget = getActiveWidget(); + if (anActiveWidget) { + AttributePtr anAttr = aFeature->attribute(anActiveWidget->attributeID()); if (anAttr.get()) anAttributeName = anAttr->id().c_str(); } if (myIsResetCurrentValue) anError = "Attribute \"" + anAttributeName + "\" is not initialized."; - else if (myIsCurrentValueUnderModification) { - anError = "Attribute \"" + anAttributeName + "\" modification is not applyed. Please click \"Enter\" or \"Tab\"."; - } + //else if (myIsCurrentValueUnderModification) { + // anError = "Attribute \"" + anAttributeName + "\" modification is not applyed. Please click \"Enter\" or \"Tab\"."; + //} + } + } + } + else { + ModuleBase_ModelWidget* anActiveWidget = getActiveWidget(); + if (anActiveWidget && anActiveWidget->getValueState() != ModuleBase_ModelWidget::Stored) { + AttributePtr anAttr = anActiveWidget->feature()->attribute(anActiveWidget->attributeID()); + if (anAttr.get()) { + QString anAttributeName = anAttr->id().c_str(); + anError = "Attribute \"" + anAttributeName + "\" modification is not applyed. Please click \"Enter\" or \"Tab\"."; } } } @@ -957,7 +964,7 @@ void PartSet_SketcherMgr::stopNestedSketch(ModuleBase_Operation* theOp) { connectToPropertyPanel(false); myIsResetCurrentValue = false; - myIsCurrentValueUnderModification = false; + //myIsCurrentValueUnderModification = false; myIsMouseOverViewProcessed = true; operationMgr()->onValidateOperation(); if (isNestedCreateOperation(theOp)) @@ -1079,10 +1086,8 @@ bool PartSet_SketcherMgr::canDisplayObject(const ObjectPtr& theObject) const // c. widget editor control #ifndef DEBUG_DO_NOT_BY_ENTER if (aCanDisplay && isNestedCreateOperation(getCurrentOperation())) { - ModuleBase_Operation* aOperation = getCurrentOperation(); - ModuleBase_IPropertyPanel* aPanel = aOperation->propertyPanel(); - ModuleBase_ModelWidget* anActiveWdg = aPanel ? aPanel->activeWidget() : 0; - ModuleBase_WidgetEditor* anEditorWdg = anActiveWdg ? dynamic_cast(anActiveWdg) : 0; + ModuleBase_ModelWidget* anActiveWidget = getActiveWidget(); + ModuleBase_WidgetEditor* anEditorWdg = anActiveWidget ? dynamic_cast(anActiveWidget) : 0; // the active widget editor should not influence here. The presentation should be visible always // when this widget is active. if (!anEditorWdg && !myIsPopupMenuActive) { @@ -1097,7 +1102,14 @@ bool PartSet_SketcherMgr::canDisplayObject(const ObjectPtr& theObject) const bool PartSet_SketcherMgr::canDisplayCurrentCreatedFeature() const { - return myIsMouseOverWindow || (!myIsResetCurrentValue && !myIsCurrentValueUnderModification); + bool aCanDisplay = myIsMouseOverWindow; + if (!aCanDisplay) { + ModuleBase_ModelWidget* anActiveWidget = getActiveWidget(); + bool isValueStored = anActiveWidget && anActiveWidget->getValueState() == ModuleBase_ModelWidget::Stored; + aCanDisplay = !myIsResetCurrentValue && isValueStored; + } + return aCanDisplay; + //return myIsMouseOverWindow || (!myIsResetCurrentValue && !myIsCurrentValueUnderModification); #ifdef DEBUG_MOUSE_OVER_WINDOW_FLAGS qDebug(QString("canDisplayCurrentCreatedFeature: %1").arg(mouseOverWindowFlagsInfo()).toStdString().c_str()); #endif @@ -1254,8 +1266,8 @@ void PartSet_SketcherMgr::connectToPropertyPanel(const bool isToConnect) if (isToConnect) { connect(aWidget, SIGNAL(beforeValuesChanged()), this, SLOT(onBeforeValuesChangedInPropertyPanel())); - connect(aWidget, SIGNAL(valuesModified()), - this, SLOT(onValuesModied())); + connect(aWidget, SIGNAL(valueStateChanged()), + this, SLOT(onValueStateChanged())); connect(aWidget, SIGNAL(valuesChanged()), this, SLOT(onValuesChangedInPropertyPanel())); connect(aWidget, SIGNAL(afterValuesChanged()), this, SLOT(onAfterValuesChangedInPropertyPanel())); @@ -1276,6 +1288,19 @@ ModuleBase_Operation* PartSet_SketcherMgr::getCurrentOperation() const return myModule->workshop()->currentOperation(); } +//************************************************************** +ModuleBase_ModelWidget* PartSet_SketcherMgr::getActiveWidget() const +{ + ModuleBase_ModelWidget* aWidget = 0; + ModuleBase_Operation* anOperation = getCurrentOperation(); + if (anOperation) { + ModuleBase_IPropertyPanel* aPanel = anOperation->propertyPanel(); + if (aPanel) + aWidget = aPanel->activeWidget(); + } + return aWidget; +} + void PartSet_SketcherMgr::visualizeFeature(const FeaturePtr& theFeature, const bool isEditOperation, const bool isToDisplay, diff --git a/src/PartSet/PartSet_SketcherMgr.h b/src/PartSet/PartSet_SketcherMgr.h index f926b6b65..44cbca6d5 100644 --- a/src/PartSet/PartSet_SketcherMgr.h +++ b/src/PartSet/PartSet_SketcherMgr.h @@ -206,8 +206,8 @@ private slots: /// a nested sketch feature, it hides the feature in the viewer void onLeaveViewPort(); - /// Updates the flag of reset state - void onValuesModied(); + /// Validates the operation. Apply button is disabled if the widget value is in Modified state + void onValueStateChanged(); /// Listens to the value changed signal and display the current operation feature void onBeforeValuesChangedInPropertyPanel(); /// Listens to the signal about values are to be changed in the property panel @@ -281,6 +281,9 @@ private: /// \return an operation ModuleBase_Operation* getCurrentOperation() const; + /// Get the active widget in the property panel + ModuleBase_ModelWidget* getActiveWidget() const; + /// Erase or display the feature of the current operation. If the mouse over the active view or /// a current value is changed by property panel, the feature is displayed otherwise it is hidden /// \param theOperation an operation which feature is to be displayed, it is nested create operation @@ -301,7 +304,7 @@ private: bool myIsDragging; bool myDragDone; bool myIsResetCurrentValue; /// the state that value in the property panel is reset - bool myIsCurrentValueUnderModification; /// the value is modified in PP but it is not applyed in the model + //bool myIsCurrentValueUnderModification; /// the value is modified in PP but it is not applyed in the model bool myIsMouseOverWindow; /// the state that the mouse over the view bool myIsMouseOverViewProcessed; /// the state whether the over view state is processed by mouseMove method bool myIsPopupMenuActive; /// the state of the popup menu is shown diff --git a/src/PartSet/PartSet_WidgetSketchCreator.cpp b/src/PartSet/PartSet_WidgetSketchCreator.cpp index 08e46a64d..6bc043eb4 100644 --- a/src/PartSet/PartSet_WidgetSketchCreator.cpp +++ b/src/PartSet/PartSet_WidgetSketchCreator.cpp @@ -164,7 +164,7 @@ bool PartSet_WidgetSketchCreator::focusTo() if (aCompFeature->numberOfSubs() == 0) return ModuleBase_ModelWidget::focusTo(); - connect(myModule, SIGNAL(operationResumed(ModuleBase_Operation*)), SLOT(onResumed(ModuleBase_Operation*))); + connect(myModule, SIGNAL(resumed(ModuleBase_Operation*)), SLOT(onResumed(ModuleBase_Operation*))); SessionPtr aMgr = ModelAPI_Session::get(); // Open transaction that is general for the previous nested one: it will be closed on nested commit bool aIsOp = aMgr->isOperation(); diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 3af0fc6e3..e484aa493 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -460,7 +460,7 @@ void XGUI_Workshop::onOperationStarted(ModuleBase_Operation* theOperation) } updateCommandStatus(); - myModule->onOperationStarted(aFOperation); + myModule->operationStarted(aFOperation); // the objects of the current operation should be deactivated QObjectPtrList anObjects; @@ -488,7 +488,7 @@ void XGUI_Workshop::onOperationResumed(ModuleBase_Operation* theOperation) } updateCommandStatus(); - myModule->onOperationResumed(theOperation); + myModule->operationResumed(theOperation); } @@ -508,7 +508,7 @@ void XGUI_Workshop::onOperationStopped(ModuleBase_Operation* theOperation) hidePropertyPanel(); myPropertyPanel->cleanContent(); - myModule->onOperationStopped(aFOperation); + myModule->operationStopped(aFOperation); // the deactivated objects of the current operation should be activated back. // They were deactivated on operation start or an object redisplay @@ -534,12 +534,12 @@ void XGUI_Workshop::onOperationStopped(ModuleBase_Operation* theOperation) void XGUI_Workshop::onOperationCommitted(ModuleBase_Operation* theOperation) { - myModule->onOperationCommitted(theOperation); + myModule->operationCommitted(theOperation); } void XGUI_Workshop::onOperationAborted(ModuleBase_Operation* theOperation) { - myModule->onOperationAborted(theOperation); + myModule->operationAborted(theOperation); } void XGUI_Workshop::setGrantedFeatures(ModuleBase_Operation* theOperation)