]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
now the object browser uses "auto_size" preferences correctly
authorasl <asl@opencascade.com>
Mon, 25 Jul 2005 05:13:02 +0000 (05:13 +0000)
committerasl <asl@opencascade.com>
Mon, 25 Jul 2005 05:13:02 +0000 (05:13 +0000)
src/SalomeApp/SalomeApp_Application.cxx

index 919ecd246914e154324485bedc1a74156c6639d4..f0341870936d972e47417afce84ba12b00df6d19 100644 (file)
@@ -1238,7 +1238,7 @@ QWidget* SalomeApp_Application::createWindow( const int flag )
       ob->addColumn( tr( QString().sprintf( "OBJ_BROWSER_COLUMN_%d", i ) ), i );
       ob->setColumnShown( i, resMgr->booleanValue( "ObjectBrowser",
                                                    QString().sprintf( "visibility_column_%d", i ), true ) );
-      //ob->listView()->setColumnWidthMode( i, autoSize ? QListView::Maximum : QListView::Manual );
+      ob->listView()->setColumnWidthMode( i, autoSize ? QListView::Maximum : QListView::Manual );
     }
 
     // Create OBSelector
@@ -1494,11 +1494,10 @@ void SalomeApp_Application::preferencesChanged( const QString& sec, const QStrin
        return;
 
       bool autoSize = resMgr->booleanValue( "ObjectBrowser", "auto_size", false );
-      /*for ( int i = SalomeApp_DataObject::CT_Value; i <= SalomeApp_DataObject::CT_RefEntry; i++ )
+      for ( int i = SalomeApp_DataObject::CT_Value; i <= SalomeApp_DataObject::CT_RefEntry; i++ )
         ob->listView()->setColumnWidthMode( i, autoSize ? QListView::Maximum : QListView::Manual );
 
-      if( autoSize )
-       ob->listView()->adjustSize();*/
+      updateObjectBrowser( false );
     }
   }
 
@@ -1817,7 +1816,10 @@ void SalomeApp_Application::updateObjectBrowser( const bool updateModels )
   }
 
   if ( objectBrowser() )
+  {
+    objectBrowser()->updateGeometry();
     objectBrowser()->updateTree();
+  }
 }