grass
grass copied to clipboard
wxGUI/locdownload: show progress of downloading new location as Data Catalog info bar message
Implementing/close feature #3278.
https://github.com/OSGeo/grass/assets/50632337/ca626964-c1a5-4f05-bb65-8712927cda77
Works nicely, thanks for improvement. @tmszi Some notes below:
* would be nice to avoid blinking `Abort` button when progress is updated (minor issue) * when download process is finished `Abort` button does nothing - it should be automatically removed (major issue)
Thank for review and suggestions. Both issues are fixed with commit no. https://github.com/OSGeo/grass/pull/3287/commits/cfb83a5ef94ef39baf3bcb22f2b9f34f02b574dd.
Thank for review and suggestions. Both issues are fixed with commit no.
Great, I tested updated PR and I can confirm that both issues are fixed.
@tmszi Small note: It make sense to me to show the dialog for selecting location to be downloaded when process of downloading is aborted. I am just not sure whether it make sense to show the dialog on successful download.
When testing multiple times I am getting error:
Traceback (most recent call last):
File "/home/martin/src/grass/dist.x86_64-pc-linux-
gnu/gui/wxpython/core/gthread.py", line 138, in OnDone
event.ondone(event)
File "/home/martin/src/grass/dist.x86_64-pc-linux-
gnu/gui/wxpython/startup/locdownload.py", line 411, in
download_complete_callback
self.parent.newLocationIsDownloaded.emit()
File "/home/martin/src/grass/dist.x86_64-pc-linux-
gnu/etc/python/grass/pydispatch/signal.py", line 233, in
emit
dispatcher.send(signal=self, *args, **kwargs)
File "/home/martin/src/grass/dist.x86_64-pc-linux-
gnu/etc/python/grass/pydispatch/dispatcher.py", line 343, in
send
response = robustapply.robustApply(
^
File "/home/martin/src/grass/dist.x86_64-pc-linux-
gnu/etc/python/grass/pydispatch/robustapply.py", line 60, in
robustApply
return receiver(*arguments, **named)
File "/home/martin/src/grass/dist.x86_64-pc-linux-
gnu/gui/wxpython/datacatalog/tree.py", line 1652, in
AddDownloadedNewLocation
self._reloadGrassDBNode(self.selected_grassdb[0])
@tmszi Small note: It make sense to me to show the dialog for selecting location to be downloaded when process of downloading is aborted. I am just not sure whether it make sense to show the dialog on successful download.
Fixed with https://github.com/OSGeo/grass/pull/3287/commits/90e4a7ce9de6297b6cdb0819d448343a72507024.
When testing multiple times I am getting error:
Traceback (most recent call last): File "/home/martin/src/grass/dist.x86_64-pc-linux- gnu/gui/wxpython/core/gthread.py", line 138, in OnDone event.ondone(event) File "/home/martin/src/grass/dist.x86_64-pc-linux- gnu/gui/wxpython/startup/locdownload.py", line 411, in download_complete_callback self.parent.newLocationIsDownloaded.emit() File "/home/martin/src/grass/dist.x86_64-pc-linux- gnu/etc/python/grass/pydispatch/signal.py", line 233, in emit dispatcher.send(signal=self, *args, **kwargs) File "/home/martin/src/grass/dist.x86_64-pc-linux- gnu/etc/python/grass/pydispatch/dispatcher.py", line 343, in send response = robustapply.robustApply( ^ File "/home/martin/src/grass/dist.x86_64-pc-linux- gnu/etc/python/grass/pydispatch/robustapply.py", line 60, in robustApply return receiver(*arguments, **named) File "/home/martin/src/grass/dist.x86_64-pc-linux- gnu/gui/wxpython/datacatalog/tree.py", line 1652, in AddDownloadedNewLocation self._reloadGrassDBNode(self.selected_grassdb[0])
I wasn't successfull to reproduce it.
I wasn't successfull to reproduce it.
I tested again with the same result:
@tmszi It seems to be related to multiple GRASS data dirs (databases). I tried to removed second data dir and download was successful then
I was not able to reproduce this bug in the main branch. So it seems to be related to this PR.
I was not able to reproduce this bug in the
mainbranch. So it seems to be related to this PR.
I can' reproduce it (I tried with 2 and 3 GRASS GIS database directories added). Could you send me exact follow steps to reproduce it, please?
Tested with Python/wxPython version:
GRASS fire_grass6data/demomapset:~ > python3 -c "import sys, wx; print(sys.version); print(wx.version())"
3.11.8 (main, Mar 1 2024, 19:20:20) [GCC 13.2.1 20240113]
4.2.1 gtk3 (phoenix) wxWidgets 3.2.2.1