]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix PAL5247: incorrect resizing of widgets by splitter when using it's compress/uncom...
authorvsr <vsr@opencascade.com>
Mon, 31 Jan 2005 12:18:23 +0000 (12:18 +0000)
committervsr <vsr@opencascade.com>
Mon, 31 Jan 2005 12:18:23 +0000 (12:18 +0000)
src/PatchQt/qsplitterP.cxx

index cbe25a69111404fd138891b631b367afe9fa49b6..3983746b2f07ef6eb8593ead7c1ef24d528e296d 100644 (file)
@@ -131,10 +131,6 @@ QSplitterPHandle::QSplitterPHandle( Qt::Orientation o,
   left->setCursor( arrowCursor );      right->setCursor( arrowCursor );
   unleft->setCursor( arrowCursor ); unright->setCursor( arrowCursor );
 
-// VSR 21/11/02 -> ================================
-  setMinimumSize( 1, 1 );
-// VSR 21/11/02 <- ================================
-
   connect(left,    SIGNAL(clicked()), this, SLOT(onBeforeCompress()));
   connect(right,   SIGNAL(clicked()), this, SLOT(onAfterCompress()));
   connect(unleft,  SIGNAL(clicked()), this, SLOT(onBeforeUnCompress()));
@@ -855,8 +851,8 @@ void QSplitterP::moveAfter( int pos, int id, bool upLeft )
        }
     } else {
        int right = pick( w->geometry().bottomRight() );
-
-               int dd = right - pos + 1;
+       int ddd = pick( QSize(contentsRect().width(), contentsRect().height() ) ) - pos;
+               int dd = QMIN(right - pos + 1, ddd);
        dd = QMAX( pick(minSize(w)), QMIN(dd, pick(maxSize(w))));
        int newRight = pos+dd-1;
        setG( w, pos, dd );