Since #1572 the empty Selection properties panel shrinks to its title bar.
When it shares a tab stack with another panel, such as Collections, Qt
gives the whole stack the smallest maximum height of its tabs, so the
stack could not be resized while nothing was selected and snapped back
small on every deselect.
The panel now shrinks only when it is not tabbed. While tabbed it keeps the
normal size limits and skips remembering and restoring the area heights,
which would otherwise bring back heights from before it was tabbed.
tst_selectionpanelheight gets a tabbed case: the stack can be made taller
with nothing selected, keeps its height through a select and deselect, and
the panel shrinks again once untabbed.
#1533 stopped the panel shrinking to its title bar when the selection
had nothing to edit, so that it would keep the height the user gave it
(#1439). Users want the room back for the Collections and Auto numbering
panels while nothing is selected (#1566).
The panel's layout is back to QLayout::SetMaximumSize, so the empty
panel shrinks as before. Just before its last editor goes, the panel
keeps the heights of every docked panel in its area; when an editor
comes back it gives them back with QMainWindow::resizeDocks, the call a
separator drag makes. Giving only this panel its height back fell 35 px
short in the test: the neighbours had been split again from their size
hints and gave up only part of the room.
Test: tst_selectionpanelheight now checks, twice over, that the empty
panel shrinks and that selecting an element again brings back the height
the user gave it. Without the restore the panel comes back at 470 px
instead of 560; on master the empty panel does not shrink.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>