Skip to content

Commit

Permalink
Make _update_viewport more robust in case the application has formall…
Browse files Browse the repository at this point in the history
…y been closed
  • Loading branch information
astrofrog committed Apr 18, 2018
1 parent 3338643 commit 97f68b2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion glue/core/qt/data_collection_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,10 @@ def set_data_collection(self, data_collection):
def _update_viewport(self, *args, **kwargs):
# This forces the widget containing the list view to update/redraw,
# reflecting any changes in color/labels/content
self.viewport().update()
try:
self.viewport().update()
except RuntimeError:
pass

def edit_label(self, index):
if not (self._model.flags(index) & Qt.ItemIsEditable):
Expand Down

0 comments on commit 97f68b2

Please sign in to comment.