From: dmv Date: Mon, 24 May 2010 14:20:58 +0000 (+0000) Subject: IPAL21721 Width of column is changed in table on sorting. X-Git-Tag: V5_1_main_20100526 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9b65f3a2f29a7310371e030acd96c3af2d7edd3a;p=modules%2Fvisu.git IPAL21721 Width of column is changed in table on sorting. --- diff --git a/src/VISU_I/VISU_TableDlg.cxx b/src/VISU_I/VISU_TableDlg.cxx index 46a6b993..df08dc62 100644 --- a/src/VISU_I/VISU_TableDlg.cxx +++ b/src/VISU_I/VISU_TableDlg.cxx @@ -591,11 +591,11 @@ void VISU_TableDlg::TableWidget::initialize( _PTR(Study) study, VISU::Table_i* t setEditEnabled( false ); showColumnTitles( false ); - updateTableFromServant(); + updateTableFromServant( true ); updateButtonsState(); } -void VISU_TableDlg::TableWidget::updateTableFromServant() +void VISU_TableDlg::TableWidget::updateTableFromServant( bool adjust ) { _PTR(SObject) aSObject = myStudy->FindObjectID( myTableObj->GetObjectEntry() ); if ( aSObject ) { @@ -652,7 +652,7 @@ void VISU_TableDlg::TableWidget::updateTableFromServant() } setRowData( i-1, strlist ); } - adjustTable(); + if ( adjust ) adjustTable(); } catch( ... ) { MESSAGE("VISU_TableDlg::TableWidget::initialize : Exception has been caught !!!"); @@ -710,7 +710,7 @@ void VISU_TableDlg::TableWidget::updateTableFromServant() } setRowData( i-1, strlist ); } - adjustTable(); + if ( adjust ) adjustTable(); } catch( ... ) { MESSAGE("VISU_TableDlg::TableWidget::initialize : Exception has been caught !!!"); @@ -731,7 +731,7 @@ void VISU_TableDlg::TableWidget::setEditEnabled( bool enable ) if( !enable ) { myTable->horizontalHeader()->setSortIndicatorShown( false ); myTable->verticalHeader()->setSortIndicatorShown( false ); - adjustTable(); + //adjustTable(); } mySortPolicyLabel->setEnabled( enable ); @@ -1146,7 +1146,7 @@ void VISU_TableDlg::TableWidget::columnClicked( int column ) ( VISU::SortPolicy )mySortPolicyCombo->currentIndex() ); myTable->horizontalHeader()->setSortIndicatorShown( true ); myTable->verticalHeader()->setSortIndicatorShown( false ); - updateTableFromServant(); + updateTableFromServant( false ); } } /*! @@ -1161,7 +1161,7 @@ void VISU_TableDlg::TableWidget::rowClicked( int row ) ( VISU::SortPolicy )mySortPolicyCombo->currentIndex() ); myTable->horizontalHeader()->setSortIndicatorShown( false ); myTable->verticalHeader()->setSortIndicatorShown( true ); - updateTableFromServant(); + updateTableFromServant( false ); } */ } diff --git a/src/VISU_I/VISU_TableDlg.h b/src/VISU_I/VISU_TableDlg.h index a911a6ce..c2161c88 100644 --- a/src/VISU_I/VISU_TableDlg.h +++ b/src/VISU_I/VISU_TableDlg.h @@ -141,7 +141,7 @@ public slots: void rowClicked( int ); protected: - void updateTableFromServant(); + void updateTableFromServant( bool adjust ); private: _PTR(Study) myStudy;