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);
|
||||
}
|
||||
void loadViewSettings();
|
||||
void loadDesignSettings();
|
||||
|
||||
private slots:
|
||||
void actionNew();
|
||||
|
|
|
@ -385,6 +385,7 @@ MainWindow::MainWindow(const QString &filename)
|
|||
viewModeThrownTogether();
|
||||
#endif
|
||||
loadViewSettings();
|
||||
loadDesignSettings();
|
||||
|
||||
setAcceptDrops(true);
|
||||
clearCurrentOutput();
|
||||
|
@ -420,6 +421,14 @@ MainWindow::loadViewSettings(){
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
MainWindow::loadDesignSettings()
|
||||
{
|
||||
QSettings settings;
|
||||
if (settings.value("design/autoReload").toBool())
|
||||
designActionAutoReload->setChecked(true);
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
if (root_module)
|
||||
|
@ -1063,6 +1072,8 @@ void MainWindow::checkAutoReload()
|
|||
|
||||
void MainWindow::autoReloadSet(bool on)
|
||||
{
|
||||
QSettings settings;
|
||||
settings.setValue("design/autoReload",designActionAutoReload->isChecked());
|
||||
if (on) {
|
||||
autoReloadInfo = QString();
|
||||
autoReloadTimer->start(200);
|
||||
|
|
Loading…
Reference in New Issue