]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
23641: [CEA] FIELDS Window not locked to panel.
authorrnv <rnv@opencascade.com>
Mon, 21 Jan 2019 15:06:12 +0000 (18:06 +0300)
committerrnv <rnv@opencascade.com>
Mon, 21 Jan 2019 15:06:12 +0000 (18:06 +0300)
src/LightApp/LightApp_Application.cxx
src/LightApp/LightApp_Application.h

index 6fbc2c7a8894b4c3bb6fd28a2e208e798c3467d0..2a7d62cdcf2b48409511656863eff7888611a680 100644 (file)
@@ -1020,10 +1020,15 @@ void LightApp_Application::onOpenDoc()
 {
   SUIT_Study* study = activeStudy();
   
-  if ( !checkExistingDoc() )
+  if ( !checkExistingDoc( false ) )
+    return;
+  
+  QString aName = getFileName( true, QString(), getFileFilter( true ), QString(), 0 );
+  if ( aName.isNull() ) //Cancel
     return;
   
-  CAM_Application::onOpenDoc();
+  closeDoc();
+  onOpenDoc( aName );
   
   if ( !study ) // new study will be create in THIS application
   {
@@ -5157,7 +5162,7 @@ void LightApp_Application::onViewManagerRemoved( SUIT_ViewManager* )
 /*!
   Check existing document.
 */
-bool LightApp_Application::checkExistingDoc()
+bool LightApp_Application::checkExistingDoc( bool closeExistingDoc )
 {
   bool result = true;
   if( activeStudy() ) {
@@ -5181,7 +5186,9 @@ bool LightApp_Application::checkExistingDoc()
       }
     }
     else if( answer == 1 ) {
-      closeDoc( false );
+      if (closeExistingDoc) {
+       closeDoc( false );
+      }
     } else if( answer == 2 ) {
       result = false;
     }
index f32fd38a4cff1f3a9b23a01726f320f7f4d66cd7..11fba2006798471dbc564adeaf865da392d19b26 100644 (file)
@@ -180,7 +180,7 @@ public:
   void                                updateVisibilityState( DataObjectList& theList,
                                                              SUIT_ViewModel* theViewModel );  
 
-  virtual bool                        checkExistingDoc();
+  virtual bool                        checkExistingDoc( bool checkExistingDoc = true );
 
 #ifndef DISABLE_PYCONSOLE
   PyConsole_Interp*                   getPyInterp();