]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
no message
authorstv <stv@opencascade.com>
Tue, 22 Nov 2005 13:50:10 +0000 (13:50 +0000)
committerstv <stv@opencascade.com>
Tue, 22 Nov 2005 13:50:10 +0000 (13:50 +0000)
src/SUITApp/SUITApp.cxx

index 5f3750aedffa95de7b343af5394ba726192cc70b..c63c2ae0937273376945fd2127d162a3c9b276bf 100644 (file)
@@ -7,8 +7,9 @@
 
 #include "SUITApp_Application.h"
 
-#include "SUIT_Session.h"
-#include "SUIT_ResourceMgr.h"
+#include <SUIT_Session.h>
+#include <SUIT_Desktop.h>
+#include <SUIT_ResourceMgr.h>
 
 
 #ifdef SUIT_ENABLE_PYTHON
@@ -137,11 +138,15 @@ int main( int args, char* argv[] )
   if ( !argList.isEmpty() )
   {
     SUITApp_Session* aSession = new SUITApp_Session( iniFormat );
-    if ( aSession->startApplication( argList.first() ) )
+    SUIT_Application* theApp = aSession->startApplication( argList.first() );
+    if ( theApp )
     {
       if ( !noExceptHandling )
         app.setHandler( aSession->handler() );
 
+      if ( !app.mainWidget() )
+        app.setMainWidget( theApp->desktop() );
+
       result = app.exec();
     }
     delete aSession;