bsupnik / bricksmith

LDraw Modeler for OS X
BSD 2-Clause "Simplified" License
12 stars 6 forks source link

Update file outline to be view-based #15

Open undecoded-coder opened 2 years ago

undecoded-coder commented 2 years ago

Goals:

Status: Implemented (with issues) [Updated]

Known Issues [Updated]:

Working 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).

undecoded-coder commented 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.