View Issue Details

IDProjectCategoryView StatusLast Update
0005451DarkRadiantSaving and loadingpublic25.06.2021 04:50
Reporterjonri Assigned Togreebo  
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformLinux 
Product Version2.9.1 
Target Version2.10.0Fixed in Version2.10.0 
Summary0005451: Layer operations do not mark the map as unsaved
DescriptionIf you add a new layer, rename an existing layer, or delete a layer, your file does not get marked as unsaved. It does not get the *, nor will it prompt you to save changes before closing the file. If you close and reopen the file, your changes will be lost.

These operations also do not get pushed to the undo/redo stack. I haven't checked to see whether undo/redo is coupled to the save status, feel free to break that into a new ticket if desired.
Steps To Reproduce1. Open an existing map
2. Add a new layer
3. Close the map
4. Reopen the map.

After step 3, the expected result is a message box prompting you to save your changes or cancel. In step 4, your change has been lost.
Additional InformationIssue also exists on latest master branch ec5c1afe91a53bf212f51d454d2e3923ac1ee2a4
TagsNo tags attached.

Activities

greebo

greebo

20.12.2020 04:20

administrator   ~0013170

I can confirm those three operations not marking the map as modified.
Adding and moving scene elements to layers is setting the modified status, but none of all these layer operations are pushed to the undo stack, so they are not undoable themselves. That's a problem too, but I'd like to treat this as separate issue since it is a larger change.

Related Changesets

DarkRadiant: master 36180a45

20.12.2020 04:34

greebo


Details Diff
0005451: Add (failing) unit tests asserting that create, rename and delete layer operations mark the map as modified Affected Issues
0005451
mod - test/CMakeLists.txt Diff File
add - test/LayerManipulation.cpp Diff File
add - test/resources/tdm/maps/general_purpose.mapx Diff File
mod - tools/msvc/Tests/Tests.vcxproj Diff File
mod - tools/msvc/Tests/Tests.vcxproj.filters Diff File

DarkRadiant: master 54b35855

24.12.2020 09:05

greebo


Details Diff
0005451: Expand unit test by more failing cases Affected Issues
0005451
mod - test/LayerManipulation.cpp Diff File

DarkRadiant: master 25fc3542

24.12.2020 11:47

greebo


Details Diff
0005451: Mark the map as modified from within the various layer Add/Remove/Move command implementation.
Remove the setModified call from the LayerOrthoContextMenuItems.
Add RemoveSelectionFromLayer command, as it was missing from the command set.
Affected Issues
0005451
mod - radiant/ui/layers/LayerOrthoContextMenuItem.cpp Diff File
mod - radiantcore/layers/LayerModule.cpp Diff File
mod - test/LayerManipulation.cpp Diff File

DarkRadiant: master 5ae4cfea

24.12.2020 12:04

greebo


Details Diff
0005451: LayerOrthoContextMenuItems now dispatch the operations through the command system Affected Issues
0005451
mod - radiant/ui/layers/LayerOrthoContextMenuItem.cpp Diff File
mod - radiant/ui/layers/LayerOrthoContextMenuItem.h Diff File

DarkRadiant: master 06d0f8b3

25.12.2020 03:03

greebo


Details Diff
0005451: Add new "CreateLayer" command accepting a string argument. Mark the map as modified after creating a layer, also when created through the dialog.
A weakness of CommandSystem::executeCommand is that there is no way to return a result, which is limiting its use - this way we can't directly use the CreateNewLayer command in the CreateLayerDialog implementation.
Affected Issues
0005451
mod - radiant/ui/UserInterfaceModule.cpp Diff File
mod - radiant/ui/layers/CreateLayerDialog.cpp Diff File
mod - radiant/ui/layers/LayerContextMenu.h Diff File
mod - radiant/ui/layers/LayerControlDialog.cpp Diff File
mod - radiantcore/layers/LayerModule.cpp Diff File
mod - test/LayerManipulation.cpp Diff File

DarkRadiant: master 3c1db140

25.12.2020 03:25

greebo


Details Diff
0005451: Introduce DeleteLayer command Affected Issues
0005451
mod - radiant/ui/layers/LayerControl.cpp Diff File
mod - radiantcore/layers/LayerModule.cpp Diff File
mod - test/LayerManipulation.cpp Diff File

DarkRadiant: master f1db2f5c

25.12.2020 03:51

greebo


Details Diff
0005451: Add "RenameLayer" command. Mark map as modified after renaming a layer. Affected Issues
0005451
mod - radiant/ui/layers/LayerControl.cpp Diff File
mod - radiantcore/layers/LayerModule.cpp Diff File
mod - test/LayerManipulation.cpp Diff File

Issue History

Date Modified Username Field Change
20.12.2020 03:31 jonri New Issue
20.12.2020 04:07 greebo Status new => acknowledged
20.12.2020 04:20 greebo Status acknowledged => confirmed
20.12.2020 04:20 greebo Note Added: 0013170
25.12.2020 03:03 greebo Assigned To => greebo
25.12.2020 03:03 greebo Status confirmed => assigned
25.12.2020 03:53 greebo Changeset attached => DarkRadiant master 36180a45
25.12.2020 03:53 greebo Changeset attached => DarkRadiant master 54b35855
25.12.2020 03:53 greebo Changeset attached => DarkRadiant master 25fc3542
25.12.2020 03:53 greebo Changeset attached => DarkRadiant master 5ae4cfea
25.12.2020 03:53 greebo Changeset attached => DarkRadiant master 06d0f8b3
25.12.2020 03:53 greebo Changeset attached => DarkRadiant master 3c1db140
25.12.2020 03:53 greebo Changeset attached => DarkRadiant master f1db2f5c
25.12.2020 03:54 greebo Target Version => 2.10.0
25.12.2020 03:54 greebo Status assigned => resolved
25.12.2020 03:54 greebo Resolution open => fixed
25.12.2020 03:54 greebo Fixed in Version => 2.10.0
25.06.2021 04:50 greebo Status resolved => closed