Skip to content
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

wxGUI: fix mapCreated signal handling #4174

Merged
merged 4 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion gui/wxpython/gui_core/forms.py
echoix marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -806,11 +806,12 @@ def OnDone(self, event):
# was closed also when aborted but better is leave it open
wx.CallLater(2000, self.Close)

def OnMapCreated(self, name, ltype):
def OnMapCreated(self, name, ltype, add=None):
petrasovaa marked this conversation as resolved.
Show resolved Hide resolved
"""Map created or changed

:param name: map name
:param ltype: layer type (prompt value)
:param add: whether to display layer or not
"""
if hasattr(self, "addbox") and self.addbox.IsChecked():
add = True
Expand Down
3 changes: 2 additions & 1 deletion gui/wxpython/rdigit/g.gui.rdigit.py
echoix marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,12 @@ def _addLayer(self, name, ltype="raster"):
render=True,
)

def OnMapCreated(self, name, ltype):
def OnMapCreated(self, name, ltype, add=None):
petrasovaa marked this conversation as resolved.
Show resolved Hide resolved
"""Add new created raster layer into map

:param str name: map name
:param str ltype: layer type
:param bool add: unused
"""
self._mapObj.Clean()
self._addLayer(name=name, ltype=ltype)
Expand Down
Loading