Practical sessions
There are some additions you could make to the code:
- Move the Import Model button to the menu bar.
The Import Model button may feel a bit misplaced since the start, but now we have the chance to change the functionality. Move the functionality of the button to a submenu of the menu bar, making it easier to understand how to import a model to the application.
- Add a confirmation dialog when the application is closed.
If we use key combinations like ALT + F4
now or press the icon to close the window, the application ends immediately. Add a simple popup dialog with a yes/no question, allowing the user to stop another possibly accidental operation. Since we have a menu bar now, you can also create a File->Exit entry, calling the same logic to request confirmation before closing the application. Oh, and don’t forget to switch back to edit mode when the application exit is requested. A hidden exit dialog is hardly usable...