[Feat] Add rename and delete of Location and Mapset in Datacatalog #710
Labels
enhancement
New feature or request
gsoc
Reserved for Google Summer of Code student(s)
GUI
wxGUI related
Projects
Is your feature request related to a problem? Please describe.
Although GRASS database (aka grassdata) is not meant to be modified by hand, locations and mapsets can only be renamed and deleted in the Startup windows, not once user starts GRASS GIS.
Describe the solution you'd like
Add Rename and Delete actions to the context menu of Location and Mapset tree items in the Datacatalog (Data tab) which is the natural place for this management.
Ideal state
Deleting a current mapset or location needs to be disabled.
Renaming current mapset or location needs to be handled in a special way. Now you can switch to a different mapset or even different location and mapset, so there is no reason why rename cannot be implemented for the current mapset or location. A naive implementation is something like a rename followed by calling the current mechanism for switching.
Additionally, user should be warned that there should be no modules or scripts running in the current mapset if it is being renamed. That applied to all the other operations, but with different wording. On unix (i.e., non-Windows), the mapset in use will be locked, i.e., there should be a check if the mapset is locked and we should honor the lock, i.e., not allow rename or delete when lock is present since that indicates another GRASS session running in that mapset. It might be a good idea to include something like "You are in a danger zone" as a first line of the delete and rename dialogs.
Rename and delete of other mapsets and of locations (including the current location) should be available only when editing of other mapsets is allowed (e.g. by "unlocking" them in the toolbar; not to be confused with the (current) mapset locking) to keep the current "no changes outside of the current mapset (by default)" paradigm. However, since changes are the main point of this functionality, the allowing of edits could be done in the delete/rename dialog, i.e., it would have an extra question/info and a button/toggle for allowing of edits. For example, "hey, you can delete/rename only when editing of other mapsets is allowed" with (toggle) buttons "[allow only for this operation] [allow now and for all following operations]" (the second being equivalent of the current "lock/unlock" button in the toolbar).
Initial implementation
This can be implemented in phases. For example, in the first phase, both deleting and renaming of current mapset can be disabled and deleting and renaming other mapsets and other locations can be made available after clinking the allow button. The additional checks and messages can be just the same as what is in the current Startup window (i.e., just reuse whatever is there now).
Additional context
Current items (7.8) in the context menu of Mapset:
Location does not have any associated actions.
This is a migrated Trac ticket 3577.
The text was updated successfully, but these errors were encountered: