Make sure the hidden label has been shown before sizeHint() gets called.
author Eike Hein
()
committer Eike Hein
()
commit 0bd337f2d0f0579682b51af8ac8266e97d27123b
tree 02342791468d84936e83fe09334a5072d3eafaf2
parent 56f577b4955c7e232ad25c555c5362687896be32
Make sure the hidden label has been shown before sizeHint() gets called.

Turns out sizeHint() may be called while the label's parent is invisible
(read: the dialog is closed), and if that's the first call to sizeHint()
the label won't have ever been shown and thus not begun adjusting the size
of its document, causing us to return a too-small hint. Because
updateItemWidgets() may run on show before sizeHint() does again this can
lead to ill-layouted item labels, basing their geometry on the broken old
hints.

It also turns out that the label doesn't need to be shown every time we
want it to update its document size; once ever while the parent chain
is shown, too, is enough, so we can get away with doing less work than
before.
src/viewer/topichistoryview.cpp
src/viewer/topichistoryview.h