Salome HOME
Merge remote branch 'origin/abn/guifix' into V7_5_BR
authorvsr <vsr@opencascade.com>
Thu, 18 Dec 2014 12:54:29 +0000 (15:54 +0300)
committervsr <vsr@opencascade.com>
Thu, 18 Dec 2014 12:54:29 +0000 (15:54 +0300)
src/PVGUI/PVGUI_Module.cxx
src/PVGUI/PVGUI_Module.h
src/PVGUI/PVGUI_Module_actions.cxx
src/PVGUI/resources/PARAVIS_msg_fr.ts

index e97566a1de124236f4e9b7138cac22156ffb2726..a2445ae97784ce240393d46af67b14e466675eaf 100644 (file)
 #include <pqServerResource.h>
 #include <pqServerConnectReaction.h>
 #include <pqPluginManager.h>
+#include <pqVCRToolbar.h>
+#include <pqAnimationScene.h>
+#include <pqServerManagerModel.h>
+#include <pqAnimationTimeToolbar.h>
 
 //#include <PVViewer_EngineWrapper.h>
 
@@ -467,6 +471,21 @@ void PVGUI_Module::initialize( CAM_Application* app )
       }
     }
   }
+  fixAnimationScene();
+
+}
+
+/**
+ * Little trick to force the proper update of the timesteps/time range when the module is initialized.
+ * This is otherwise not properly working when PARAVIS is activated after a PVViewer has already been
+ * instanciated.
+ */
+void PVGUI_Module::fixAnimationScene()
+{
+  pqServer* server = pqActiveObjects::instance().activeServer();
+  pqApplicationCore * app = pqApplicationCore::instance();
+  pqPipelineSource * src = app->getObjectBuilder()->createSource(QString("sources"), QString("TimeSource"),server);
+  app->getObjectBuilder()->destroy(src);
 }
 
 void PVGUI_Module::onStartProgress()
index 1db745ab833cc4436694edde05b7271c398f768c..0b90f3a8b1be7e8479ab3d119f068a182ec755d5 100644 (file)
@@ -169,6 +169,7 @@ public:
   inline static pqPVApplicationCore * GetPVApplication();
 
   virtual CAM_DataModel* createDataModel();
+  void  fixAnimationScene();
 
 public slots:
   //void onImportFromVisu(QString theEntry);
index e41713e2ae6341a42c8f8eade5ab6e2490ade34b..0eeb2ba40a3bc416246f129b3994ee7e5df16fd9 100644 (file)
@@ -559,7 +559,9 @@ void PVGUI_Module::pvCreateMenus()
 void PVGUI_Module::pvCreateToolBars()
 {
   SUIT_Desktop* desk = application()->desktop();
-  pqParaViewMenuBuilders::buildToolbars(*desk);
+//  pqParaViewMenuBuilders::buildToolbars(*desk);
+  PVViewer_GUIElements * guiElements = PVViewer_GUIElements::GetInstance(desk);
+  guiElements->setToolBarVisible(true);
 }
 
 /*!
index a2edd9ead56eb05c694cdba3261e91a5f477e934..ec222306be867591ade5e80b51991f55fc0a8244 100644 (file)
         <source>PREF_STOP_TRACE</source>
         <translation>Déactiver la trace (seulement pour la session suivante)</translation>
     </message>
+    <message>
+        <source>PREF_NO_EXT_PVSERVER</source>
+        <translation>Ne pas utiliser le PVServer externe (Attention: les scripts lancés en dehors de la GUI SALOME seront inutilisables !)</translation>
+    </message>
     <message>
         <source>TIT_PVISSETTINGS</source>
         <translation>Options de ParaVis </translation>