From be2787103a558b6dd6a274b84a6692a952bab244 Mon Sep 17 00:00:00 2001 From: hasufell Date: Sun, 12 Oct 2014 20:00:42 +0200 Subject: [PATCH] GUI: don't show error dialogs if there hasn't been any file chosen --- GUI/Gtk.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GUI/Gtk.hs b/GUI/Gtk.hs index f63afa6..0ccf968 100644 --- a/GUI/Gtk.hs +++ b/GUI/Gtk.hs @@ -169,7 +169,7 @@ drawDiag mygui = do 1 -> showErrorDialog "No valid x/y dimensions!" 2 -> showErrorDialog "No valid Mesh file!" _ -> return () - Nothing -> showErrorDialog "No valid Mesh file!" + Nothing -> return () -- |Saves a Diagram which is built from a given file as an SVG. @@ -184,7 +184,7 @@ saveDiag mygui = do 1 -> showErrorDialog "No valid x/y dimensions!" 2 -> showErrorDialog "No valid Mesh file!" _ -> return () - Nothing -> showErrorDialog "No valid Mesh file!" + Nothing -> return () -- |Draws and saves a Diagram which is built from a given file.