From: nds Date: Mon, 27 Nov 2017 14:12:36 +0000 (+0300) Subject: Avoid crash in SALOME mode. X-Git-Tag: V_2.10.0RC~136 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0da626fe15a07dba4a21ced101ec4d893f57692e;p=modules%2Fshaper.git Avoid crash in SALOME mode. --- diff --git a/src/ModuleBase/ModuleBase_ModelWidget.h b/src/ModuleBase/ModuleBase_ModelWidget.h index c536b0622..4882e2903 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.h +++ b/src/ModuleBase/ModuleBase_ModelWidget.h @@ -241,7 +241,7 @@ Q_OBJECT /// \return Current Editing mode bool isEditingMode() const { return myIsEditing; } - /// Returns true if the action can be processed. The default implementation is empty, returns false. + /// Returns true if the action can be processed. By default it is empty and returns false. /// \param theActionType an action type /// \param isActionEnabled if true, the enable state of the action virtual bool canProcessAction(ModuleBase_ActionType theActionType, bool& isActionEnabled); diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp index 409c2949b..973b9b6ec 100755 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -371,8 +371,8 @@ bool ModuleBase_WidgetMultiSelector::processAction(ModuleBase_ActionType theActi myWorkshop->updateCommandStatus(); #ifdef DEBUG_UNDO_REDO - printHistoryInfo(QString("processAction %1").arg(theActionType == ActionUndo ? "Undo" : "Redo"), - myCurrentHistoryIndex, mySelectedHistoryValues); + printHistoryInfo(QString("processAction %1").arg(theActionType == ActionUndo ? "Undo" + : "Redo"), myCurrentHistoryIndex, mySelectedHistoryValues); #endif return true; } diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index cc6ea32c5..e1081a65b 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -55,6 +55,8 @@ #include #endif +#include + #include #include #include @@ -295,8 +297,7 @@ void XGUI_Workshop::startApplication() Config_PropManager::registerProp("Plugins", "default_path", "Default Path", Config_Prop::Directory, ""); - std::string aDir = getenv(QString("%1Resources").arg( - ModuleBase_Preferences::resourceMgr()->appName()).toLatin1()); + std::string aDir = Config_XMLReader::resourcesConfigFile(); Config_PropManager::registerProp("Plugins", "import_initial_path", "Import initial directory", Config_Prop::Directory, aDir);