From: dbv Date: Thu, 28 May 2015 17:02:09 +0000 (+0300) Subject: mpv & nds stabilization hotfixes X-Git-Tag: V_1.2.0~20 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8b86ad5c5c3e3823199fa4926f5946e947401d32;p=modules%2Fshaper.git mpv & nds stabilization hotfixes --- diff --git a/src/Model/Model_Objects.cpp b/src/Model/Model_Objects.cpp index deadfd2a3..54033a49b 100644 --- a/src/Model/Model_Objects.cpp +++ b/src/Model/Model_Objects.cpp @@ -340,6 +340,9 @@ ObjectPtr Model_Objects::object(TDF_Label theLabel) ObjectPtr Model_Objects::object(const std::string& theGroupID, const int theIndex) { createHistory(theGroupID); + //TODO: mpv stabilization hotfix + if (myHistory[theGroupID].size() <= theIndex) + return ObjectPtr(); return myHistory[theGroupID][theIndex]; } diff --git a/src/ModuleBase/ModuleBase_ModelWidget.h b/src/ModuleBase/ModuleBase_ModelWidget.h index 81196b2cc..615fdb152 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.h +++ b/src/ModuleBase/ModuleBase_ModelWidget.h @@ -43,6 +43,9 @@ Q_OBJECT { } + //TODO: nds stabilization hotfix + virtual void disconnectSignals() {}; + /// Fills the widget with default values virtual void reset() {}; diff --git a/src/ModuleBase/ModuleBase_Operation.cpp b/src/ModuleBase/ModuleBase_Operation.cpp index fea325f68..e34df2950 100644 --- a/src/ModuleBase/ModuleBase_Operation.cpp +++ b/src/ModuleBase/ModuleBase_Operation.cpp @@ -242,6 +242,17 @@ void ModuleBase_Operation::setRunning(bool theState) emit triggered(theState); } +//TODO: nds stabilization hotfix +void ModuleBase_Operation::commitOperation() +{ + if(!myPropertyPanel) { + return; + } + ModuleBase_ModelWidget* aWidget = myPropertyPanel->activeWidget(); + if (aWidget) + aWidget->disconnectSignals(); +} + void ModuleBase_Operation::activateByPreselection() { if (!myPropertyPanel || myPreSelection.empty()) { diff --git a/src/ModuleBase/ModuleBase_Operation.h b/src/ModuleBase/ModuleBase_Operation.h index 97e742eae..c20391185 100644 --- a/src/ModuleBase/ModuleBase_Operation.h +++ b/src/ModuleBase/ModuleBase_Operation.h @@ -206,7 +206,7 @@ signals: virtual void abortOperation() {} /// Virtual method called when operation committed (see commit() method for more description) - virtual void commitOperation() {} + virtual void commitOperation(); /// Virtual method called after operation committed (see commit() method for more description) virtual void afterCommitOperation() {} diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp index ff8d200a0..45b7a2053 100644 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -106,6 +106,12 @@ ModuleBase_WidgetMultiSelector::~ModuleBase_WidgetMultiSelector() delete myShapeValidator; } +//TODO: nds stabilization hotfix +void ModuleBase_WidgetMultiSelector::disconnectSignals() +{ + disconnect(myWorkshop, SIGNAL(selectionChanged()), this, SLOT(onSelectionChanged())); +} + //******************************************************************** void ModuleBase_WidgetMultiSelector::activateCustom() { diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.h b/src/ModuleBase/ModuleBase_WidgetMultiSelector.h index 1670af098..42ca970a5 100644 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.h +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.h @@ -63,6 +63,9 @@ class MODULEBASE_EXPORT ModuleBase_WidgetMultiSelector : public ModuleBase_Widge const std::string& theParentId); virtual ~ModuleBase_WidgetMultiSelector(); + //TODO: nds stabilization hotfix + virtual void disconnectSignals(); + virtual bool restoreValue(); /// Returns list of widget controls