diff --git a/src/Preferences.cc b/src/Preferences.cc
index 94df31b3..12a5b9ca 100644
--- a/src/Preferences.cc
+++ b/src/Preferences.cc
@@ -165,6 +165,9 @@ Preferences::Preferences(QWidget *parent) : QMainWindow(parent)
updateGUI();
RenderSettings::inst()->setColors(this->colorschemes[getValue("3dview/colorscheme").toString()]);
+ //launcher Settings
+ connect(this->launcherBox, SIGNAL(stateChanged(int)), SLOT(launcherSettings(int)));
+
}
Preferences::~Preferences()
@@ -183,6 +186,14 @@ Preferences::~Preferences()
* @param widget The widget that should be shown when the action is triggered.
* This must be a child page of the stackedWidget.
*/
+
+void
+Preferences::launcherSettings(int state)
+{
+ QSettings settings;
+ settings.setValue("launcher/checkboxState", state);
+}
+
void
Preferences::addPrefPage(QActionGroup *group, QAction *action, QWidget *widget)
{
diff --git a/src/Preferences.h b/src/Preferences.h
index 102ddf15..69d76991 100644
--- a/src/Preferences.h
+++ b/src/Preferences.h
@@ -37,6 +37,7 @@ public slots:
void on_mdiCheckBox_toggled(bool);
void on_undockCheckBox_toggled(bool);
void on_checkNowButton_clicked();
+ void launcherSettings(int);
signals:
void requestRedraw() const;
diff --git a/src/Preferences.ui b/src/Preferences.ui
index 2eb1b129..1400b4a5 100644
--- a/src/Preferences.ui
+++ b/src/Preferences.ui
@@ -27,7 +27,7 @@
-
- 4
+ 3
@@ -426,7 +426,16 @@
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -464,7 +473,7 @@
0
0
803
- 325
+ 332
@@ -475,6 +484,13 @@
+ -
+
+
+ Show Launcher.
+
+
+
-
diff --git a/src/openscad.cc b/src/openscad.cc
index d18e0b96..dd12eb0f 100644
--- a/src/openscad.cc
+++ b/src/openscad.cc
@@ -574,13 +574,12 @@ int gui(vector &inputFiles, const fs::path &original_path, int argc, cha
MainWindow *mainwin = new MainWindow(assemblePath(original_path, inputFiles[0]));
#endif
if(set == true)
- mainwin->launcher->show();
-
+ mainwin->launcher->show();
QSettings settings;
int s = settings.value("launcher/checkboxState").toInt();
if(s == 0)
mainwin->launcher->hide();
-
+
app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));
int rc = app.exec();
if (MainWindow::windows) {