-
Notifications
You must be signed in to change notification settings - Fork 8
Allow to remove objects from GRM editor #284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces a mechanism for removing certain objects (like decals) in the GRM editor that cannot be edited in the in-game Eden Editor. Key changes include:
- Enhancements to TerrainObjectVM to support a removal flag and dynamic geometry calculation.
- The addition of RemoveObjectAction to manage undo/redo for object removal.
- Updates to various map editor view models and control layers to properly integrate object removal and update rendering.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/TerrainObjectVM.cs | Adds properties/methods to support object removal and generates corner points. |
| GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/RemoveObjectAction.cs | Implements undoable removal actions for terrain objects. |
| GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/EditRoadEditablePointCollection.cs | Updates to point collection editing behavior. |
| GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/Arma3WorldMapViewModel.cs | Refreshes object caching and history clearing logic upon world invalidation. |
| GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/Arma3WorldEditorViewModel.cs | Integrates object edit flushing and invalidation in world updates. |
| GameRealisticMap.Studio/Controls/IEditablePointCollection.cs | Expands the editable point collection interface with new members. |
| GameRealisticMap.Studio/Controls/GrmMapEditLayerOverlay.cs | Adjusts outline rendering logic for square objects. |
| GameRealisticMap.Studio/Controls/GrmMapEditLayer.cs | Modifies context menu and selection behavior based on object removal. |
| GameRealisticMap.Studio/Controls/GrmMapArma3.cs | Updates rendering logic to exclude removed objects and adjusts ellipse dimensions for improved scaling. |
| .github/workflows/dotnet-linux.yml & dotnet-desktop.yml | Upgrades workflow actions to the latest artifact upload version. |
Comments suppressed due to low confidence (3)
GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/TerrainObjectVM.cs:134
- The corners list is generated only once. If the object's transform or model info changes, consider clearing and regenerating the corners to ensure the geometric representation stays up to date.
if (corners.Count == 0)
GameRealisticMap.Studio/Controls/GrmMapArma3.cs:141
- [nitpick] The ellipse dimensions for tree (and similarly for bush) have been halved. Verify that this change is intentional to maintain the desired visual scaling and clarity.
dc.DrawEllipse(null, new Pen(tree, 0.2), new Point(), obj.Rectangle.Width / 2, obj.Rectangle.Height / 2);
GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/Arma3WorldMapViewModel.cs:373
- [nitpick] Resetting UndoCountLimit by first setting it to 0 and then to null may be confusing. Consider clarifying or encapsulating this logic to ensure its purpose and behavior are clear.
UndoRedoManager.UndoCountLimit = 0;
UndoRedoManager.UndoCountLimit = null;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request enables the removal of objects from the GRM editor that cannot be edited in the Eden Editor. The changes include adding support for object removal (with corresponding UI and undo/redo integration), updating the TerrainObject view model and related classes for removal state and rendering, and updating build workflow actions.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| GameRealisticMap.Studio/UndoRedo/UndoRedoManagerExtensions.cs | Introduces a Clear extension method for resetting the undo/redo manager |
| GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/TerrainObjectVM.cs | Updates the view model for terrain objects to support removal and inspection |
| GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/RemoveObjectAction.cs | Adds an undoable action for object removal |
| GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/EditRoadEditablePointCollection.cs | Adjusts point collection behavior by enabling point deletion |
| GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/Arma3WorldMapViewModel.cs | Integrates object caching, selection, and invalidation logic |
| GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/Arma3WorldEditorViewModel.cs | Updates world property handling and flushes object edits on save |
| GameRealisticMap.Studio/Controls/* | Introduces supporting changes for new object removal features in editing and rendering |
| .github/workflows/* | Upgrades the GitHub Actions upload-artifact action from v3 to v4 |
Some objects like decals cannot be edited using Eden Editor (in-game editor).
Provides a way to remove such objects