Skip to content

Commit

Permalink
wx.metadata/g.gui.cswbrowser, mdlib: set busy cursor after click on t…
Browse files Browse the repository at this point in the history
…he search btn widget
  • Loading branch information
tmszi committed Jul 2, 2020
1 parent ab7dca6 commit 72a9f34
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions grass7/gui/wxpython/wx.metadata/mdlib/cswlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@ def GetQtype(self): # TODO need to implement
def OnSearch(self, evt):
"""execute search"""

wx.BeginBusyCursor()
self.refreshResultList()
self.catalog = None
self.loadConstraints()
Expand All @@ -685,6 +686,7 @@ def OnSearch(self, evt):
current_text = self.catalogCmb.GetValue()
if current_text == '':
GMessage('Please set catalog')
wx.EndBusyCursor()
return

self.catalog_url = self.getTmpConnection(current_text)
Expand All @@ -707,6 +709,7 @@ def OnSearch(self, evt):
self.constraints.append(BBox(bbox))

if not self._get_csw():
wx.EndBusyCursor()
return

# TODO: allow users to select resources types
Expand All @@ -717,9 +720,11 @@ def OnSearch(self, evt):
self.outpoutschema = 'dc'
except ExceptionReport as err:
GError('Search error: %s' % err)
wx.EndBusyCursor()
return
except Exception as err:
GError('Connection error: %s' % err)
wx.EndBusyCursor()
return

###work around for GMD records
Expand All @@ -736,9 +741,11 @@ def OnSearch(self, evt):

except ExceptionReport as err:
GError('Search error: %s' % err)
wx.EndBusyCursor()
return
except Exception as err:
GError('Connection error: %s' % err)
wx.EndBusyCursor()
return
###work around for GMD records- END

Expand All @@ -754,6 +761,7 @@ def OnSearch(self, evt):
return

self.displyResults()
wx.EndBusyCursor()

def get_item_data(self, index, field):
if field == 'identifier':
Expand Down

0 comments on commit 72a9f34

Please sign in to comment.