Tracker: Do not try to change to an invalid or unset icon size.
This can happen if we are already at the largest or smallest size. Fixes #18066. Change-Id: Icf68627ea51a054dac806ec0c9258bc80c869483 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5840 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
753349fb2e
commit
7255d28854
@ -2224,7 +2224,7 @@ BPoseView::MessageReceived(BMessage* message)
|
||||
break;
|
||||
|
||||
case kIconMode: {
|
||||
int32 size;
|
||||
int32 size = -1;
|
||||
int32 scale;
|
||||
if (message->FindInt32("size", &size) == B_OK) {
|
||||
// Nothing else to do in this case.
|
||||
@ -2255,6 +2255,8 @@ BPoseView::MessageReceived(BMessage* message)
|
||||
}
|
||||
size = iconSize;
|
||||
}
|
||||
if (size <= 0)
|
||||
break;
|
||||
if (size != (int32)UnscaledIconSizeInt())
|
||||
fViewState->SetIconSize(size);
|
||||
SetViewMode(message->what);
|
||||
|
Loading…
Reference in New Issue
Block a user