[GRASS-git] [OSGeo/grass] 0bf022: wxGUI/datacatalog: Allow delete on multiple mapset...

Linda Kladivova noreply at github.com
Thu Jul 23 21:18:38 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/OSGeo/grass
  Commit: 0bf022093d428d74821a9556f723f0c6f2a20fdf
      https://github.com/OSGeo/grass/commit/0bf022093d428d74821a9556f723f0c6f2a20fdf
  Author: Linda Kladivova <49241681+lindakladivova at users.noreply.github.com>
  Date:   2020-07-24 (Fri, 24 Jul 2020)

  Changed paths:
    M gui/wxpython/datacatalog/tree.py
    M gui/wxpython/gis_set.py
    M gui/wxpython/startup/guiutils.py

  Log Message:
  -----------
  wxGUI/datacatalog: Allow delete on multiple mapsets in Data catalog (#795)

Add the function delete_mapsets_interactively() which is called after selecting more mapsets. Preserves the original
delete_mapset_interactively() function with the db/loc/mapset parameters as a wrapper of the new function. 

Checks ahead of time not to delete current or PERMANENT mapsets. Nothing is deleted if problem detected.
Lists all mapset with a problem (but not all problems for each mapset if more than one applies).

Return value indicates change/modification. Error on the first mapset is no change. Error in the middle
is a change, but operation is interrupted, i.e. some possibly deleted and some not.
Return value is geared towards updating (or not updating) displayed tree in data catalog and gives exact result,
so data catalog is reloaded only when one or more mapsets were (actually) deleted.
Message on error is more vague providing same info for all cases regardless of deleted mapsets
(assuming the reload of the tree and (in future better) checking ahead of time).

Exceptions/Errors are responsibility of the delete_mapsets_interactively() function.
General Exception try-except removed from the callers.

Co-authored-by: Vaclav Petras <wenzeslaus at gmail.com>




More information about the grass-commit mailing list