Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Dec 29, 2015
2 parents 5a50614 + 28eaad8 commit 446f43a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions bauble/plugins/plants/taxonomy_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ def start_taxonomy_check():
presenter.session.rollback()
else:
presenter.commit_changes()
from bauble import gui, view
search_view = gui.get_view()
if isinstance(search_view, view.SearchView):
search_view.reset_view()
from bauble import gui
view = gui.get_view()
if hasattr(view, 'update'):
view.update()
presenter.cleanup()
return error_state

Expand Down
4 changes: 2 additions & 2 deletions bauble/plugins/tag/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ def on_key_released(self, widget, event):
model.remove(row_iter)
_reset_tags_menu()
view = bauble.gui.get_view()
if isinstance(view, SearchView):
view.reset_view()
if hasattr(view, 'update'):
view.update()
except Exception, e:
utils.message_details_dialog(utils.xml_safe(str(e)),
traceback.format_exc(),
Expand Down
8 changes: 4 additions & 4 deletions bauble/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ def _impl(*args):
# cursor is
sel = self.get_selected_values()
if func(sel):
self.reset_view()
self.update()
return _impl
self.accel_group.connect_group(keyval, mod,
gtk.ACCEL_VISIBLE,
Expand Down Expand Up @@ -1051,7 +1051,7 @@ def on_activate(item, cb):
msg, tb, gtk.MESSAGE_ERROR)
logger.warning(traceback.format_exc())
if result:
self.reset_view()
self.update()

item.connect('activate', on_activate, action.callback)
menu.append(item)
Expand All @@ -1065,13 +1065,13 @@ def on_activate(item, cb):
menu.popup(None, None, None, event.button, event.time)
return True

def reset_view(self):
def update(self):
"""
Expire all the children in the model, collapse everything,
reexpand the rows to the previous state where possible and
update the infobox.
"""
logger.debug('SearchView::reset_view')
logger.debug('SearchView::update')
model, paths = self.results_view.get_selection().get_selected_rows()
ref = None
try:
Expand Down

0 comments on commit 446f43a

Please sign in to comment.