Salome HOME
Avoid crash in SALOME mode.
authornds <nds@opencascade.com>
Mon, 27 Nov 2017 14:12:36 +0000 (17:12 +0300)
committernds <nds@opencascade.com>
Mon, 27 Nov 2017 14:12:36 +0000 (17:12 +0300)
src/ModuleBase/ModuleBase_ModelWidget.h
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
src/XGUI/XGUI_Workshop.cpp

index c536b0622f2362dca2945b9a021cfba2007de765..4882e290317761c872cc6d83df7e62b6eccece0b 100644 (file)
@@ -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);
index 409c2949b32815cc215f6140d6a7916066b788c2..973b9b6ec5aeaa7d02d27de41f478b5d5fac19bc 100755 (executable)
@@ -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;
     }
index cc6ea32c57c10494b7dc5871e416069066f7c044..e1081a65bd31f6ec7ccd0b511c2de04fbe6c0256 100755 (executable)
@@ -55,6 +55,8 @@
 #include <AppElements_Workbench.h>
 #endif
 
+#include <Config_XMLReader.h>
+
 #include <ModelAPI_AttributeDocRef.h>
 #include <ModelAPI_AttributeIntArray.h>
 #include <ModelAPI_AttributeDouble.h>
@@ -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);