equal
deleted
inserted
replaced
358 /* |
358 /* |
359 Splitter handles before the first visible widget or right |
359 Splitter handles before the first visible widget or right |
360 before a hidden widget must be hidden. |
360 before a hidden widget must be hidden. |
361 */ |
361 */ |
362 bool first = true; |
362 bool first = true; |
|
363 bool allInvisible = n != 0; |
363 for (int i = 0; i < n ; ++i) { |
364 for (int i = 0; i < n ; ++i) { |
364 QSplitterLayoutStruct *s = list.at(i); |
365 QSplitterLayoutStruct *s = list.at(i); |
365 s->handle->setHidden(first || s->widget->isHidden()); |
366 bool widgetHidden = s->widget->isHidden(); |
366 if (!s->widget->isHidden()) |
367 if (allInvisible && !widgetHidden && !s->collapsed) |
|
368 allInvisible = false; |
|
369 s->handle->setHidden(first || widgetHidden); |
|
370 if (!widgetHidden) |
367 first = false; |
371 first = false; |
368 } |
372 } |
|
373 |
|
374 if (allInvisible) |
|
375 for (int i = 0; i < n ; ++i) { |
|
376 QSplitterLayoutStruct *s = list.at(i); |
|
377 if (!s->widget->isHidden()) { |
|
378 s->collapsed = false; |
|
379 break; |
|
380 } |
|
381 } |
369 |
382 |
370 int fi = 2 * q->frameWidth(); |
383 int fi = 2 * q->frameWidth(); |
371 int maxl = fi; |
384 int maxl = fi; |
372 int minl = fi; |
385 int minl = fi; |
373 int maxt = QWIDGETSIZE_MAX; |
386 int maxt = QWIDGETSIZE_MAX; |