- Create a model with two parts.
- Select a part.
- Pick command-I for part insertion.
- Enter a filter string that shows no parts.
- Press command-I to insert anyway.
Result so far: you are brought back to the document window, with the old part still selected.
- Press delete to delete the selected part.
At this point, we die in LDrawGLCamera setModelSize - for some reason the model is now zero sized?
This is the back-trace
-[LDrawGLCamera setModelSize:](self=0x0000000104315850, _cmd=0x00000001000eb7df, inModelSize=<unavailable>) + 101 at LDrawGLCamera.m:628 frame #1: 0x000000010009e0c3 Bricksmith
-LDrawGLRenderer displayNeedsUpdating: + 179 at LDrawGLRenderer.m:1873frame #2: 0x00007fff921e8e0c CoreFoundation
__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12 frame #3: 0x00007fff920dca6d CoreFoundation
_CFXNotificationPost + 2893frame #4: 0x00007fff8bba67ba Foundation
-[NSNotificationCenter postNotificationName:object:userInfo:] + 68 frame #5: 0x0000000100086613 Bricksmith
-LDrawDirective noteNeedsDisplay + 99 at LDrawDirective.m:816frame #6: 0x000000010004129e Bricksmith
-[LDrawDocument outlineViewSelectionDidChange:](self=0x000000010035b030, _cmd=0x00007fff8f7a6c9e, notification=0x0000618000247710) + 910 at LDrawDocument.m:3627 frame #7: 0x00007fff921e8e0c CoreFoundation
CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 12frame #8: 0x00007fff920dca6d CoreFoundation
_CFXNotificationPost + 2893 frame #9: 0x00007fff8bba67ba Foundation
-[NSNotificationCenter postNotificationName:object:userInfo:] + 68frame #10: 0x00007fff8ee6ac0f AppKit
-[NSTableView _sendSelectionChangedNotificationForRows:columns:] + 177 frame #11: 0x00007fff8ed97504 AppKit
-[NSTableView _enableSelectionPostingAndPost] + 406frame #12: 0x0000000100039a95 Bricksmith
-[LDrawDocument delete:](self=0x000000010035b030, _cmd=0x00007fff8f799ceb, sender=0x00006100000bd9a0) + 85 at LDrawDocument.m:1677 frame #13: 0x00007fff8ef49340 AppKit
-[NSApplication sendAction:to:from:] + 327frame #14: 0x00007fff8ef642a8 AppKit
-[NSMenuItem _corePerformAction] + 394 frame #15: 0x00007fff8ef63fe4 AppKit
-[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 117frame #16: 0x00007fff8ef6315c AppKit
-[NSMenu performKeyEquivalent:] + 289 frame #17: 0x00007fff8ef5f9c1 AppKit
-[NSApplication _handleKeyEquivalent:] + 822frame #18: 0x00007fff8efceea9 AppKit
-[NSWindow keyDown:] + 83 frame #19: 0x0000000100063859 Bricksmith
-LDrawDocumentWindow keyDown: + 73 at LDrawDocumentWindow.m:29frame #20: 0x00007fff8ef2bbda AppKit
forwardMethod + 122 frame #21: 0x00007fff8ef2bbda AppKit
forwardMethod + 122frame #22: 0x00007fff8ef2bbda AppKit
forwardMethod + 122 frame #23: 0x00007fff8ef2bbda AppKit
forwardMethod + 122frame #24: 0x00007fff8ef2bbda AppKit
forwardMethod + 122 frame #25: 0x00007fff8ef2bbda AppKit
forwardMethod + 122frame #26: 0x00007fff8ef2bbda AppKit
forwardMethod + 122 frame #27: 0x00007fff8ef2bbda AppKit
forwardMethod + 122frame #28: 0x0000000100066ef8 Bricksmith
-[LDrawGLView keyDown:](self=0x0000000100370fd0, _cmd=0x00007fff8f76cf79, theEvent=0x0000610000138420) + 1192 at LDrawGLView.m:1371 frame #29: 0x00007fff8ef2d65b AppKit
-[NSWindow sendEvent:] + 1843frame #30: 0x00007fff8eecec42 AppKit
-[NSApplication sendEvent:] + 3395 frame #31: 0x000000010006dc07 Bricksmith
-BricksmithApplication sendEvent: + 343 at BricksmithApplication.m:71frame #32: 0x00007fff8ed1eb89 AppKit
-[NSApplication run] + 646 frame #33: 0x00007fff8ed09913 AppKit
NSApplicationMain + 940frame #34: 0x0000000100001aa2 Bricksmith`main(argc=3, argv=0x00007fff5fbff8b0) + 3
This is what appears to be going wrong: for some reason the noteNeedsDisplay method of the LDrawFile that the user is editing (hit due to the delete - an edit of the document) is triggering a displayNeedsUpdating in the part preview, whose currently displayed part is NIL, causing the call to setModelSize to have a junk box!
Fixed with r650.