Skip to content

Commit

Permalink
Only show warning when closing for visible data viewers
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed May 22, 2015
1 parent 7f03fe5 commit cd823c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion glue/qt/widgets/data_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def _confirm_close(self):
:rtype: bool. True if user wishes to close. False otherwise
"""
if self._warn_close and (not os.environ.get('GLUE_TESTING')):
if self._warn_close and (not os.environ.get('GLUE_TESTING')) and self.isVisible():
buttons = QMessageBox.Ok | QMessageBox.Cancel
dialog = QMessageBox.warning(self, "Confirm Close",
"Do you want to close this window?",
Expand Down

0 comments on commit cd823c6

Please sign in to comment.