Skip to content

Commit

Permalink
don't close DirectorDialog if sanity check fails
Browse files Browse the repository at this point in the history
Avoid user having to enter all the details again.
  • Loading branch information
cjmayo committed Feb 21, 2018
1 parent 7fe05e7 commit 5a8bfc5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions fract4dgui/director.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,7 @@ def generate(self,create_avi=True):
self.check_sanity()
except SanityCheckError as exn:
self.show_error(_("Cannot Generate Animation"), str(exn))
return
except UserCancelledError:
return
raise

png_gen=PNGGen.PNGGeneration(self.animation, self.compiler, self)
res=png_gen.show()
Expand Down Expand Up @@ -711,7 +709,11 @@ def onResponse(self,widget,id):
self.hide()
elif id == DirectorDialog.RESPONSE_RENDER:
self.animation.set_avi_file(self.txt_temp_avi.get_text())
self.generate(self.converterpath is not None)
try:
self.generate(self.converterpath is not None)
except (SanityCheckError, UserCancelledError):
# prevent dialog closing if being run
GObject.signal_stop_emission_by_name(self, "response")

def main(self):
Gtk.main()
Expand Down

0 comments on commit 5a8bfc5

Please sign in to comment.