Open undecoded-coder opened 2 years ago
I now have selection and reloading working together properly in my view-based-file-outline branch! It turned out to be pretty simple in the end. However I accidentally messed up the viewport layout in interface builder such that vertical scrollbars (and placard icons) are no longer displaying, so I am still trying to resolve that before I submit a PR to close this issue. Edit: This has been resolved in the submitted PR.
Goals:
NSImageView
for native drawing of icon images (enabling use of adaptive images)Status: Implemented (with issues) [Updated]
Known Issues [Updated]:
Modifying a part (namely, notifying that it was changed) causes the outline to lose selectionVertical scroll bars in viewports are not displayedWorking on getting this done. Layout and display is working nicely. Unfortunately, it turns out Apple has changed the way
-[NSTableView reloadData]
works for view-based tables/outlines (according to the docs), so that it destroys and recreates the row views on every reload, and apparently forgets about the current selection.Since Bricksmith sends a change notification every time a part is selected (whether in the outline or the viewport), which triggers a reload of the outline view in
-[LDrawDocument docChanged:]
, the selection is basically lost as soon as it is made, while the viewport just acts confused (there must be some sort of dependency on the outline view selection somewhere).