diff --git a/GUI/Gtk.hs b/GUI/Gtk.hs index 89054cd..bffcdc6 100644 --- a/GUI/Gtk.hs +++ b/GUI/Gtk.hs @@ -261,6 +261,7 @@ saveDiag' fp mygui = yD = (,) <$> readMaybe ylD' <*> readMaybe yuD' :: Maybe (Double, Double) + case (xD, yD) of (Just xD', Just yD') -> do renderCairo "out.svg" diff --git a/Parser/Meshparser.hs b/Parser/Meshparser.hs index 9ec3050..df2fd9a 100644 --- a/Parser/Meshparser.hs +++ b/Parser/Meshparser.hs @@ -13,7 +13,7 @@ import Parser.Core meshToArr :: String -- ^ the string to convert -> [PT] -- ^ the resulting vertice table meshToArr xs = - fmap (p2) . + fmap p2 . fmap (\(Just (x, _)) -> x) . filter (/= Nothing) . fmap (runParser parseVertice) .