From: nds Date: Fri, 5 Dec 2014 06:36:57 +0000 (+0300) Subject: An improvement for the sketch operation restarting mode change. X-Git-Tag: V_0.6.0^2~20 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d2ddf73ccae4eeb347c2c5305fa788555711b278;p=modules%2Fshaper.git An improvement for the sketch operation restarting mode change. Ename the enumeration values for better readability. --- diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index c0875b7c1..630644826 100644 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -145,10 +145,10 @@ void PartSet_Module::onOperationComitted(ModuleBase_Operation* theOperation) FeaturePtr aFeature = theOperation->feature(); std::shared_ptr aSPFeature = std::dynamic_pointer_cast(aFeature); - if (aSPFeature && (myRestartingMode == RM_LastFeatureUse || - myRestartingMode == RM_LastFeatureUse)) { + if (aSPFeature && (myRestartingMode == RM_LastFeatureUsed || + myRestartingMode == RM_EmptyFeatureUsed)) { myLastOperationId = theOperation->id(); - myLastFeature = myRestartingMode == RM_LastFeatureUse ? theOperation->feature() : FeaturePtr(); + myLastFeature = myRestartingMode == RM_LastFeatureUsed ? theOperation->feature() : FeaturePtr(); launchOperation(myLastOperationId); } breakOperationSequence(); @@ -517,7 +517,7 @@ void PartSet_Module::onKeyRelease(ModuleBase_IViewWindow* theWnd, QKeyEvent* the void PartSet_Module::onEnterReleased() { - myRestartingMode = RM_LastFeatureEmpty; + myRestartingMode = RM_EmptyFeatureUsed; } void PartSet_Module::onNoMoreWidgets() @@ -529,8 +529,8 @@ void PartSet_Module::onNoMoreWidgets() std::shared_ptr aSPFeature = std::dynamic_pointer_cast(aFeature); if (aSPFeature) { - if (myRestartingMode != RM_ForbidRestarting) - myRestartingMode = RM_LastFeatureUse; + if (myRestartingMode != RM_Forbided) + myRestartingMode = RM_LastFeatureUsed; aOperation->commit(); } } @@ -560,7 +560,7 @@ void PartSet_Module::onVertexSelected(ObjectPtr theObject, const TopoDS_Shape& t ModuleBase_IPropertyPanel* aPanel = aOperation->propertyPanel(); const QList& aWidgets = aPanel->modelWidgets(); if (aWidgets.last() == aPanel->activeWidget()) { - myRestartingMode = RM_ForbidRestarting; + myRestartingMode = RM_Forbided; } } } diff --git a/src/PartSet/PartSet_Module.h b/src/PartSet/PartSet_Module.h index 86a813d16..1d9fc45df 100644 --- a/src/PartSet/PartSet_Module.h +++ b/src/PartSet/PartSet_Module.h @@ -31,9 +31,9 @@ Q_OBJECT /// Enumeration to specify the restart operation properties. enum RestartingMode { RM_None, /// the operation should not be restarted - RM_ForbidRestarting, /// the operation should not be restarted after there is no active widget - RM_LastFeatureUse, /// the operation is restarted and use the previous feature for own initialization - RM_LastFeatureEmpty /// the operation is restarted and does not use the previous feature + RM_Forbided, /// the operation should not be restarted after there is no active widget + RM_LastFeatureUsed, /// the operation is restarted and use the previous feature for own initialization + RM_EmptyFeatureUsed /// the operation is restarted and does not use the previous feature }; public: