]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
no message
authortma <tma@opencascade.com>
Wed, 24 Aug 2005 10:01:08 +0000 (10:01 +0000)
committertma <tma@opencascade.com>
Wed, 24 Aug 2005 10:01:08 +0000 (10:01 +0000)
src/Qtx/QtxResourceMgr.cxx
src/STD/STD_Application.cxx
src/STD/STD_Application.h
src/SUIT/SUIT_Application.h

index b9249875bdc6a70b501003d2904e7a35b25e7a89..6d3cf15f1f1d6950025a3f68b03070707f90ac2a 100644 (file)
@@ -287,7 +287,7 @@ bool QtxResourceMgr::IniFormat::load( const QString& fname, QMap<QString, Sectio
     else if ( data.contains( "=" ) && !section.isEmpty() )
     {
       int pos = data.find( separator );
-      QString key = data.left( pos - 1 ).stripWhiteSpace();
+      QString key = data.left( pos ).stripWhiteSpace();
       QString val = data.mid( pos + 1 ).stripWhiteSpace();
       secMap[section].insert( key, val );
     }
index 947b8f746962d4730ecc87d554beb23a439103a5..681e7bc070ae5a3070e9887f4eea7027479e41da 100755 (executable)
@@ -750,3 +750,14 @@ QString STD_Application::getDirectory( const QString& initial, const QString& ca
     parent = desktop();
   return QFileDialog::getExistingDirectory( initial, parent, 0, caption, true );
 }
+
+void STD_Application::setDesktop( SUIT_Desktop* desk )
+{
+  SUIT_Desktop* prev = desktop();
+
+  SUIT_Application::setDesktop( desk );
+
+  if ( prev != desk && desk )
+    connect( desk, SIGNAL( closing( SUIT_Desktop*, QCloseEvent* ) ),
+             this, SLOT( onDesktopClosing( SUIT_Desktop*, QCloseEvent* ) ) );
+}
index 418c110be2791710c76fb491d85a7a12b4e33573..378d030d04d342316708bd74176d120ae992380f 100755 (executable)
@@ -109,6 +109,8 @@ protected:
   virtual void          updateDesktopTitle();
   virtual void          updateCommandsStatus();
 
+  virtual void          setDesktop( SUIT_Desktop* );
+
   virtual void          beforeCloseDoc( SUIT_Study* theDoc );
   virtual void          afterCloseDoc();
 
index 45646bb19bcd8be6bf2379ca64a8fdf009006f06..1961d77b4858b2c85f8699cd2d082d26b2a69588 100755 (executable)
@@ -91,7 +91,7 @@ protected:
   SUIT_Application*     startApplication( int, char** ) const;
   SUIT_Application*     startApplication( const QString&, int, char** ) const;
 
-  void                  setDesktop( SUIT_Desktop* );
+  virtual void          setDesktop( SUIT_Desktop* );
 
   //! Creates a new Study instance. Must be redefined in new application according to its Study type.
   virtual SUIT_Study*   createNewStudy();