From: stv Date: Fri, 3 Jun 2005 04:35:08 +0000 (+0000) Subject: no message X-Git-Tag: T3_0_0_a1~25 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0d2e89bd7f69627be141b8b4a2605d33d8baf647;p=modules%2Fgui.git no message --- diff --git a/src/Qtx/QtxWorkstack.cxx b/src/Qtx/QtxWorkstack.cxx index fd3955e47..8fd98059c 100644 --- a/src/Qtx/QtxWorkstack.cxx +++ b/src/Qtx/QtxWorkstack.cxx @@ -99,10 +99,25 @@ void QtxWorkstack::split( const int o ) area->removeWidget( curWid ); newArea->insertWidget( curWid ); + distributeSpace( trg ); + curWid->show(); curWid->setFocus(); } +void QtxWorkstack::distributeSpace( QSplitter* split ) const +{ + if ( !split ) + return; + + QIntList szList = split->sizes(); + int size = ( split->orientation() == Horizontal ? + split->width() : split->height() ) / szList.count(); + for ( QIntList::iterator it = szList.begin(); it != szList.end(); ++it ) + *it = size; + split->setSizes( szList ); +} + void QtxWorkstack::splitVertical() { split( Qt::Vertical ); diff --git a/src/Qtx/QtxWorkstack.h b/src/Qtx/QtxWorkstack.h index 804d3c201..fa9c4584a 100644 --- a/src/Qtx/QtxWorkstack.h +++ b/src/Qtx/QtxWorkstack.h @@ -79,6 +79,8 @@ private: void updateState(); void updateState( QSplitter* ); + void distributeSpace( QSplitter* ) const; + private: QWidget* myWin; QtxWorkstackArea* myArea;