grass icon indicating copy to clipboard operation
grass copied to clipboard

wxGUI/locdownload: show progress of downloading new location as Data Catalog info bar message

Open tmszi opened this issue 1 year ago • 9 comments

Implementing/close feature #3278.

https://github.com/OSGeo/grass/assets/50632337/ca626964-c1a5-4f05-bb65-8712927cda77

tmszi avatar Dec 04 '23 18:12 tmszi

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.

tmszi avatar Feb 09 '24 18:02 tmszi

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.

landam avatar Feb 25 '24 10:02 landam

@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.

image

landam avatar Feb 25 '24 10:02 landam

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])

landam avatar Feb 25 '24 11:02 landam

@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.

tmszi avatar Feb 26 '24 14:02 tmszi

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.

tmszi avatar Feb 26 '24 14:02 tmszi

I wasn't successfull to reproduce it.

I tested again with the same result:

image

@tmszi It seems to be related to multiple GRASS data dirs (databases). I tried to removed second data dir and download was successful then

image

landam avatar Mar 22 '24 22:03 landam

I was not able to reproduce this bug in the main branch. So it seems to be related to this PR.

landam avatar Mar 23 '24 11:03 landam

I was not able to reproduce this bug in the main branch. 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

tmszi avatar Mar 24 '24 15:03 tmszi