]> git.sur5r.net Git - fstl/commitdiff
Fix double-click to open .stl on windows
authorMatt Keeter <matt.j.keeter@gmail.com>
Thu, 27 Mar 2014 01:40:59 +0000 (21:40 -0400)
committerMatt Keeter <matt.j.keeter@gmail.com>
Thu, 27 Mar 2014 01:50:47 +0000 (21:50 -0400)
src/app.cpp

index afa4ea7d7307d1e19c6b430bdbc6d973e1618fb2..b6eb3af88c300e9925e5408105d7b3ebb0461c06 100644 (file)
@@ -8,7 +8,10 @@ App::App(int argc, char *argv[]) :
     QApplication(argc, argv), window(new Window())
 {
     window->show();
-    window->load_stl(":gl/sphere.stl");
+    if (argc > 1)
+        window->load_stl(argv[1]);
+    else
+        window->load_stl(":gl/sphere.stl");
 }
 
 bool App::event(QEvent* e)