mirror of https://github.com/vitalif/openscad
Merge pull request #15 from donbright/designsettings
Save the setting of 'Design/Auto Reload and Recompile' between sessionsstl_dim
commit
14ff3185ef
|
@ -80,6 +80,7 @@ private:
|
||||||
static_cast<MainWindow*>(userdata)->console->append(msg);
|
static_cast<MainWindow*>(userdata)->console->append(msg);
|
||||||
}
|
}
|
||||||
void loadViewSettings();
|
void loadViewSettings();
|
||||||
|
void loadDesignSettings();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void actionNew();
|
void actionNew();
|
||||||
|
|
|
@ -385,6 +385,7 @@ MainWindow::MainWindow(const QString &filename)
|
||||||
viewModeThrownTogether();
|
viewModeThrownTogether();
|
||||||
#endif
|
#endif
|
||||||
loadViewSettings();
|
loadViewSettings();
|
||||||
|
loadDesignSettings();
|
||||||
|
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
clearCurrentOutput();
|
clearCurrentOutput();
|
||||||
|
@ -420,6 +421,14 @@ MainWindow::loadViewSettings(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
MainWindow::loadDesignSettings()
|
||||||
|
{
|
||||||
|
QSettings settings;
|
||||||
|
if (settings.value("design/autoReload").toBool())
|
||||||
|
designActionAutoReload->setChecked(true);
|
||||||
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
{
|
{
|
||||||
if (root_module)
|
if (root_module)
|
||||||
|
@ -1063,6 +1072,8 @@ void MainWindow::checkAutoReload()
|
||||||
|
|
||||||
void MainWindow::autoReloadSet(bool on)
|
void MainWindow::autoReloadSet(bool on)
|
||||||
{
|
{
|
||||||
|
QSettings settings;
|
||||||
|
settings.setValue("design/autoReload",designActionAutoReload->isChecked());
|
||||||
if (on) {
|
if (on) {
|
||||||
autoReloadInfo = QString();
|
autoReloadInfo = QString();
|
||||||
autoReloadTimer->start(200);
|
autoReloadTimer->start(200);
|
||||||
|
|
Loading…
Reference in New Issue