-rw-r--r-- | libqtaux/qsplitter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libqtaux/qsplitter.cpp b/libqtaux/qsplitter.cpp index 39321f8..959d5e1 100644 --- a/libqtaux/qsplitter.cpp +++ b/libqtaux/qsplitter.cpp @@ -682,97 +682,97 @@ void QSplitter::doResize() } else if ( s->mode == KeepSize ) { a[i].stretch = 0; a[i].minimumSize = pick( minSize(s->wid) ); a[i].sizeHint = s->sizer; a[i].maximumSize = pick( s->wid->maximumSize() ); a[i].empty = FALSE; } else if ( s->mode == FollowSizeHint ) { a[i].stretch = 0; a[i].minimumSize = a[i].sizeHint = pick( s->wid->sizeHint() ); a[i].maximumSize = pick( s->wid->maximumSize() ); a[i].empty = FALSE; } else { //proportional a[i].stretch = s->sizer; a[i].maximumSize = pick( s->wid->maximumSize() ); a[i].sizeHint = a[i].minimumSize = pick( minSize(s->wid) ); a[i].empty = FALSE; } } qGeomCalc( a, 0, n, pick( r.topLeft() ), pick( r.size() ), 0 ); for ( i = 0; i< n; i++ ) { QSplitterLayoutStruct *s = data->list.at(i); if ( orient == Horizontal ) s->wid->setGeometry( a[i].pos, r.top(), a[i].size, r.height() ); else s->wid->setGeometry( r.left(), a[i].pos, r.width(), a[i].size ); } } void QSplitter::recalc( bool update ) { int fi = 2*frameWidth(); int maxl = fi; int minl = fi; int maxt = QWIDGETSIZE_MAX; int mint = fi; int n = data->list.count(); bool first = TRUE; /* The splitter before a hidden widget is always hidden. The splitter before the first visible widget is hidden. The splitter before any other visible widget is visible. */ for ( int i = 0; i< n; i++ ) { QSplitterLayoutStruct *s = data->list.at(i); if ( !s->isSplitter ) { - QSplitterLayoutStruct *p = (i > 0) ? p = data->list.at( i-1 ) : 0; + QSplitterLayoutStruct *p = (i > 0) ? data->list.at( i-1 ) : 0; if ( p && p->isSplitter ) if ( first || s->wid->isHidden() ) p->wid->hide(); //may trigger new recalc else p->wid->show(); //may trigger new recalc if ( !s->wid->isHidden() ) first = FALSE; } } bool empty=TRUE; for ( int j = 0; j< n; j++ ) { QSplitterLayoutStruct *s = data->list.at(j); if ( !s->wid->isHidden() ) { empty = FALSE; if ( s->isSplitter ) { minl += s->sizer; maxl += s->sizer; } else { QSize minS = minSize(s->wid); minl += pick( minS ); maxl += pick( s->wid->maximumSize() ); mint = QMAX( mint, trans( minS )); int tm = trans( s->wid->maximumSize() ); if ( tm > 0 ) maxt = QMIN( maxt, tm ); } } } if ( empty ) maxl = maxt = 0; else maxl = QMIN( maxl, QWIDGETSIZE_MAX ); if ( maxt < mint ) maxt = mint; if ( orient == Horizontal ) { setMaximumSize( maxl, maxt ); setMinimumSize( minl, mint ); } else { setMaximumSize( maxt, maxl ); setMinimumSize( mint, minl ); } if ( update ) doResize(); } /*! \enum QSplitter::ResizeMode |