debugger/osx: Don't use uninitialised NSRect when creating pop-up button.

The initial size doesn't really matter because the pop-up button is
resized before being added to the container that holds it and the
expression field.  The disassembly viewer apparently wasn't updated
properly like the memory viewer when the auto-sizing code was
refactored.

Hopefully this will fix the debugger crashing when restoring window
positions from configuration (although I would have thought this would
cause crashes in more situations if it was the cause of that).
This commit is contained in:
Vas Crabb 2024-11-19 02:38:20 +11:00
parent 483917442d
commit d4602651a8

View File

@ -45,9 +45,7 @@
[expressionField sizeToFit];
// create the subview popup
subviewButton = [[NSPopUpButton alloc] initWithFrame:NSOffsetRect(expressionFrame,
expressionFrame.size.width,
0)];
subviewButton = [[NSPopUpButton alloc] initWithFrame:NSMakeRect(0, 0, 100, 19)];
[subviewButton setAutoresizingMask:(NSViewWidthSizable | NSViewMinXMargin | NSViewMinYMargin)];
[subviewButton setBezelStyle:NSBezelStyleShadowlessSquare];
[subviewButton setFocusRingType:NSFocusRingTypeNone];