From: asl Date: Wed, 30 Sep 2009 07:24:11 +0000 (+0000) Subject: 0020498: Entry column is always shown on module activation X-Git-Tag: V5_1_3rc1~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=13cc60ef0951abfb7d2120996ad03f6a9f649944;p=modules%2Fgui.git 0020498: Entry column is always shown on module activation --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 236055250..82a439d94 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -71,6 +71,7 @@ #include #include #include +#include #include #include @@ -1615,6 +1616,11 @@ QWidget* LightApp_Application::createWindow( const int flag ) ob->setWindowTitle( tr( "OBJECT_BROWSER" ) ); connect( ob, SIGNAL( requestUpdate() ), this, SLOT( onRefresh() ) ); + QString EntryCol = QObject::tr( "ENTRY_COLUMN" ); + SUIT_AbstractModel* treeModel = dynamic_cast( ob->model() ); + treeModel->registerColumn( 0, EntryCol, LightApp_DataObject::EntryId ); + treeModel->setAppropriate( EntryCol, Qtx::Toggled ); + // temporary commented /* OB_ListView* ob_list = dynamic_cast( const_cast( ob->listView() ) ); diff --git a/src/LightApp/LightApp_Module.cxx b/src/LightApp/LightApp_Module.cxx index 8bd88c4ea..5ebe69044 100644 --- a/src/LightApp/LightApp_Module.cxx +++ b/src/LightApp/LightApp_Module.cxx @@ -219,6 +219,9 @@ bool LightApp_Module::activateModule( SUIT_Study* study ) if ( mySwitchOp == 0 ) mySwitchOp = new LightApp_SwitchOp( this ); + /* BUG 0020498 : The Entry column is always shown at module activation + The registration of column is moved into LightApp_Application + QString EntryCol = QObject::tr( "ENTRY_COLUMN" ); LightApp_DataModel* m = dynamic_cast( dataModel() ); if( m ) @@ -226,7 +229,7 @@ bool LightApp_Module::activateModule( SUIT_Study* study ) SUIT_AbstractModel* treeModel = dynamic_cast( getApp()->objectBrowser()->model() ); m->registerColumn( getApp()->objectBrowser(), EntryCol, LightApp_DataObject::EntryId ); treeModel->setAppropriate( EntryCol, Qtx::Toggled ); - } + }*/ return res; } @@ -247,6 +250,7 @@ bool LightApp_Module::deactivateModule( SUIT_Study* study ) anIt.value()->abort(); } + /* BUG 0020498 : The Entry column is always shown at module activation QString EntryCol = QObject::tr( "ENTRY_COLUMN" ); LightApp_DataModel* m = dynamic_cast( dataModel() ); if( m ) @@ -256,6 +260,7 @@ bool LightApp_Module::deactivateModule( SUIT_Study* study ) treeModel->setAppropriate( EntryCol, Qtx::Shown ); m->unregisterColumn( getApp()->objectBrowser(), EntryCol ); } + */ return CAM_Module::deactivateModule( study ); } diff --git a/src/SUIT/SUIT_TreeModel.cxx b/src/SUIT/SUIT_TreeModel.cxx index dc76e7205..ef5f40b0d 100755 --- a/src/SUIT/SUIT_TreeModel.cxx +++ b/src/SUIT/SUIT_TreeModel.cxx @@ -580,12 +580,12 @@ QPixmap SUIT_TreeModel::columnIcon( const QString& name ) const void SUIT_TreeModel::setAppropriate( const QString& name, const Qtx::Appropriate appr ) { for( int i=0, n=myColumns.size(); i