Skip to content

Commit

Permalink
GUI: call G_gisinit when forms are run standalone (e.g. from parser) (O…
Browse files Browse the repository at this point in the history
…SGeo#2489)

* GUI: call G_gisinit when forms are run standalone (e.g. from parser)
Repeated calls to G_gisinit are safe;
When forms.py are loaded as a part of other code, one can assume that
G_gisinit has already been called.

See OSGeo#2484 for discussion.
  • Loading branch information
marisn authored and ninsbl committed Feb 17, 2023
1 parent fe17692 commit c182d6f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gui/wxpython/gui_core/gselect.py
Original file line number Diff line number Diff line change
Expand Up @@ -3109,6 +3109,14 @@ def __init__(
self.SetValue("")

def _append_mapset_signatures(self, mapset, element, items):
# A workaround to list signature files before a separate
# signature management module is developed
try:
from grass.lib.gis import G_gisinit

G_gisinit("")
except Exception:
return
try:
from grass.lib.imagery import (
I_SIGFILE_TYPE_SIG,
Expand Down

0 comments on commit c182d6f

Please sign in to comment.