summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/debugger
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2024-11-19 02:38:20 +1100
committer Vas Crabb <vas@vastheman.com>2024-11-19 02:38:20 +1100
commitd4602651a8eaaddfa19f2b54a12578bca3005d9b (patch)
tree4bcb4ca6fd2fab1a39631540db966bed9cc5c505 /src/osd/modules/debugger
parent483917442db8d1a2487be2ce009e958b7409d640 (diff)
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).
Diffstat (limited to 'src/osd/modules/debugger')
-rw-r--r--src/osd/modules/debugger/osx/disassemblyviewer.mm4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/osd/modules/debugger/osx/disassemblyviewer.mm b/src/osd/modules/debugger/osx/disassemblyviewer.mm
index 20ec457f628..a0659c00cfc 100644
--- a/src/osd/modules/debugger/osx/disassemblyviewer.mm
+++ b/src/osd/modules/debugger/osx/disassemblyviewer.mm
@@ -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];