Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for multiple saved window layouts in Tomb Editor and binds switching between saved layouts to hotkeys, while also adjusting panel initialization and some UI visibility/statistics update logic.
Changes:
- Added configuration support for named custom dock layouts and an “active layout” concept.
- Added Window → Layouts dynamic menu to switch/save/delete layouts and introduced hotkey commands to switch to layouts 1–9.
- Refactored initialization timing for
Panel3D/Panel2DMapand tweaked rendering/panel visibility update behavior.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| TombLib/TombLib.Forms/Controls/RenderingPanel.cs | Presents a cleared frame on resize to avoid stale visuals after resize. |
| TombEditor/ToolWindows/MainView.cs | Initializes panels during rendering init; refactors bottom panel visibility logic and stats update flow. |
| TombEditor/Forms/FormMain.Designer.cs | Replaces “Restore default layout” menu item with a “Layouts” submenu hook. |
| TombEditor/Forms/FormMain.cs | Implements Layouts menu population and layout switch/save/delete logic; handles hotkey-driven layout switching events. |
| TombEditor/Editor.cs | Adds SwitchLayoutEvent and SwitchLayout(int) API to raise layout switch requests. |
| TombEditor/Controls/Panel3D/Panel3DInit.cs | Moves runtime initialization logic into a new Initialize() method. |
| TombEditor/Controls/Panel3D/Panel3DDraw.cs | Minor cleanup (whitespace). |
| TombEditor/Controls/Panel3D/Panel3DCameraMovement.cs | Updates key filter field name usage. |
| TombEditor/Controls/Panel3D/Panel3D.cs | Adjusts fields to allow deferred initialization (no longer initialized in ctor). |
| TombEditor/Controls/Panel2DMap.cs | Moves runtime initialization logic into a new Initialize() method and makes dispose unsubscription conditional. |
| TombEditor/Configuration.cs | Adds Window_CustomLayouts, Window_ActiveLayoutName, and NamedLayout type. |
| TombEditor/Command.cs | Adds SwitchLayout1..9 commands that raise layout switch requests. |
| Installer/Changes.txt | Documents the new multi-layout feature in release notes. |
Files not reviewed (1)
- TombEditor/Forms/FormMain.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 6 comments.
Files not reviewed (1)
- TombEditor/Forms/FormMain.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // They will be loaded and saved automatically. | ||
| public class Configuration : ConfigurationBase | ||
| { | ||
| public const int MaxWindowLayouts = 10; |
There was a problem hiding this comment.
MaxWindowLayouts is introduced but not enforced when adding new layouts (Window_CustomLayouts can grow without bound), and other code uses separate hard-coded limits (e.g., 9 hotkey entries). Consider enforcing this limit when saving/adding layouts and using the constant consistently across command registration/menu display to prevent unbounded config growth and mismatched UI behavior.
Nickelony
left a comment
There was a problem hiding this comment.
All good, just some nitpicks. Please review Copilot comments and check whether any of them are valid.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.
Files not reviewed (1)
- TombEditor/Forms/FormMain.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
There is currently an issue with floating toolboxes snapping to the bottom right corner after switching layout. |
Allows to save multiple window layouts and bind them to hotkeys.