Commit b727c15a authored by Daniel Teske's avatar Daniel Teske

ProjectMode: Alwyas show at least one target

Even though that target is not usseable at that width, this looks
better.

Change-Id: If985808bcde6c0a836e4d6085536d0a1d9023c4d
Task-number: QTCREATORBUG-14182
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 93011385
......@@ -239,7 +239,7 @@ QSize TargetSelector::sizeHint() const
int TargetSelector::maxVisibleTargets() const
{
return (width() - ((NAVBUTTON_WIDTH + 1) * 2 + 3))/(targetWidth() + 1);
return qMax((width() - ((NAVBUTTON_WIDTH + 1) * 2 + 3))/(targetWidth() + 1), 1);
}
void TargetSelector::getControlAt(int x, int y, int *buttonIndex, int *targetIndex, int *targetSubIndex)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment