]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Improvement of help system
authorvsv <vsv@opencascade.com>
Wed, 15 Aug 2018 09:56:02 +0000 (12:56 +0300)
committervsv <vsv@opencascade.com>
Wed, 15 Aug 2018 09:56:02 +0000 (12:56 +0300)
src/PythonAddons/doc/PythonAddons.rst [new file with mode: 0644]
src/PythonAddons/doc/boxFeature.rst [new file with mode: 0644]
src/PythonAddons/doc/rectangleFeature.rst [new file with mode: 0644]
src/PythonAddons/macros/box/widget.xml
src/XGUI/XGUI_Workshop.cpp

diff --git a/src/PythonAddons/doc/PythonAddons.rst b/src/PythonAddons/doc/PythonAddons.rst
new file mode 100644 (file)
index 0000000..3480bd5
--- /dev/null
@@ -0,0 +1,3 @@
+
+Python addons
+=============
\ No newline at end of file
diff --git a/src/PythonAddons/doc/boxFeature.rst b/src/PythonAddons/doc/boxFeature.rst
new file mode 100644 (file)
index 0000000..d724515
--- /dev/null
@@ -0,0 +1,3 @@
+
+Box
+===
diff --git a/src/PythonAddons/doc/rectangleFeature.rst b/src/PythonAddons/doc/rectangleFeature.rst
new file mode 100644 (file)
index 0000000..3148b08
--- /dev/null
@@ -0,0 +1,3 @@
+
+Rectangle
+=========
index 51d5a0c07117f43e30b1ea3879e8fd74ca1df573..f45e454103f97b6f4460089bd3ee6d1c2f17a213 100644 (file)
@@ -23,7 +23,8 @@ email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com
   <workbench id="Macros" document="Part">
     <group id="Samples">
 
-      <feature id="Box_script" title="Box" tooltip="Create a box parallel to xyz by extruding a rectangular" icon="icons/Addons/box_ico.png">
+      <feature id="Box_script" title="Box" tooltip="Create a box parallel to xyz by extruding a rectangular" icon="icons/Addons/box_ico.png"
+            helpfile="boxFeature.html">
         <doublevalue id="width"  label="Width: " min="0" step="1.0" default="50" tooltip="Box width">
           <validator id="GeomValidators_Positive"/>
         </doublevalue>
index 6ca6f7d50f1ce7ead8f2c81bc5050910fccdbd13..1edb2dca53af9d40ed2717e9dc38f83c4621cf2a 100755 (executable)
@@ -591,9 +591,12 @@ void XGUI_Workshop::onHelpActionClicked()
         QString aDir(getenv("OPENPARTS_ROOT_DIR"));
         aDocDir = aDir + aSep + "doc" + aSep + "gui";
 #endif
-        QStringList aParams;
-        aParams << aDocDir + aSep + aHelpPage;
-        QProcess::startDetached(aBrowserName, aParams);
+        QString aFileName = aDocDir + aSep + aHelpPage;
+        if (QFile::exists(aFileName)) {
+          QStringList aParams;
+          aParams << aFileName;
+          QProcess::startDetached(aBrowserName, aParams);
+        }
       }
     }
   }