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/gui_core: fix open map display overlay settings dialog #2065

Merged
merged 1 commit into from
Jan 8, 2022

Conversation

tmszi
Copy link
Member

@tmszi tmszi commented Jan 3, 2022

Describe the bug
The map overlay dialog doesn't open when you add an overlay to the map and double click on it again.

To Reproduce
Steps to reproduce the behavior:

  1. Launch wxGUI
  2. Add some overlay e.g. north arrow
  3. Left double mouse click on north arrow overlay or via right mouse click to invoke overlay menu -> North arrow properties
  4. See error
Traceback (most recent call last):
  File "/usr/lib64/grass80/gui/wxpython/mapwin/buffered.py",
line 1405, in MouseActions

self.OnButtonDClick(event)
  File "/usr/lib64/grass80/gui/wxpython/mapwin/buffered.py",
line 1643, in OnButtonDClick

self.overlayActivated.emit(overlayId=self.dragid)
  File
"/usr/lib64/grass80/etc/python/grass/pydispatch/signal.py",
line 233, in emit

dispatcher.send(signal=self, *args, **kwargs)
  File "/usr/lib64/grass80/etc/python/grass/pydispatch/dispa
tcher.py", line 344, in send

response = robustapply.robustApply(
  File "/usr/lib64/grass80/etc/python/grass/pydispatch/robus
tapply.py", line 60, in robustApply

return receiver(*arguments, **named)
  File "/usr/lib64/grass80/gui/wxpython/mapdisp/frame.py",
line 1344, in _activateOverlay

if dlg.IsShown():
RuntimeError
:
wrapped C/C++ object of type TaskFrame has been deleted

Expected behavior
The map overlay dialog should be open when you add an overlay to the map and double click on it again.

System description:

  • GRASS GIS version main git branch

Additional context

Bug was introduced with this commit.

The MapPanelBase class is inherited from wx.Panel class which init
method has name param arg. It is handled in the TaskFrame class
OnCancel method in gui_core/forms.py script, for not destroy (hide
only) overlay dialog after the overlay is first added to the map.
@tmszi tmszi added bug Something isn't working GUI wxGUI related labels Jan 3, 2022
@petrasovaa petrasovaa added this to the 8.2.0 milestone Jan 4, 2022
Copy link
Contributor

@lindakarlovska lindakarlovska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmszi tmszi merged commit 258918e into OSGeo:main Jan 8, 2022
@tmszi tmszi deleted the fix-wxgui-open-overlay-settings-dialog branch January 8, 2022 05:35
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Oct 26, 2022
)

The MapPanelBase class is inherited from wx.Panel class which init
method has name param arg. It is handled in the TaskFrame class
OnCancel method in gui_core/forms.py script, for not destroy (hide
only) overlay dialog after the overlay is first added to the map.
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
)

The MapPanelBase class is inherited from wx.Panel class which init
method has name param arg. It is handled in the TaskFrame class
OnCancel method in gui_core/forms.py script, for not destroy (hide
only) overlay dialog after the overlay is first added to the map.
neteler pushed a commit to nilason/grass that referenced this pull request Nov 7, 2023
)

The MapPanelBase class is inherited from wx.Panel class which init
method has name param arg. It is handled in the TaskFrame class
OnCancel method in gui_core/forms.py script, for not destroy (hide
only) overlay dialog after the overlay is first added to the map.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GUI wxGUI related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants