summaryrefslogtreecommitdiff
path: root/libqtaux
Side-by-side diff
Diffstat (limited to 'libqtaux') (more/less context) (ignore whitespace changes)
-rw-r--r--libqtaux/qsplitter.cpp2
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
@@ -698,65 +698,65 @@ void QSplitter::doResize()
}
}
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