Object Viewer 7.2 Enhance: semi-persistent object tabs; close slots too? query Bug Number: n/a Release notes (y/n): Yes For Release Nums: 7.2 See Document: Object Viewer Revisions for RiverWare 7.2 / Dec 2017 http://cadswes2.colorado.edu/~philw/2017/ObjSlotViewerRev/ObjViewerRevForRw72.html The Object Viewer's set of simulation object tabs is now persistent within the RiverWare session. The Object Viewer can be closed, and reopened using a new "Object Viewer" button on the bottom of the RiverWare workspace. When reopening the Object Viewer, it will have the same set of object tabs it had when the viewer was closed (unless any of those simulation objects have been deleted). The Object Viewer button is enabled only if at least one simulation object (tab) is present -- or was present, the last time the Object Viewer was shown. Otherwise, the Object Viewer can be shown by "opening" a simulation object (e.g. by double clicking an object icon in the workspace). Note: We originally planned to allow the Object Viewer to be shown "empty", i.e. without any simulation object tabs. But we ran into some technical difficulties with the "empty" state. For this reason, the new Object Viewer button needs to be disabled when the Object Viewer's object tab list is empty. One new operation was added to the Object Viewer. File >> "Remove All Objects and Close" closes the viewer, and erases its persistent object tab list. If instead the user chooses "Close Window", or clicks the Red-X button in the window's titlebar, the current set of object tabs will be restored the next time the Object Viewer is shown. When removing an object tab from the Object Viewer or closing an Open Object Dialog, IF there are any Open Slots for that object -- either in their own Open Slot Dialog or in the Slot Viewer -- a new "Close Slots Too?" popup dialog is presented, with three choices, "Yes", "No", and "Cancel". This dialog also presents a "Don't show this dialog again ..." checkbox. TECHNICAL: The list of simulation objects shown in the Object Viewer, as object tabs, is now represented within a new data model class: Sim/ObjViewerConfig. A single instance is maintained in Sim/SimWS (the SimWorkspace class). The ObjViewerConfig state is NOT saved in the RiverWare model file. The "Close Slots Too?" popup dialog is implemented with a new OpenObjectDlg:: QueryCloseAlsoSlotsDlg class, a QDialog subclass. The public interface is limited to the following single static "query" method. Of course, the query dialog is not actually constructed and shown if the user has already checked the "Don't show this dialog again" checkbox. // return indication: continue with object close. static bool OpenObjectDlg::QueryCloseAlsoSlotsDlg::query (SimObj* refObj); ---