preserve layout in config

This commit is contained in:
garak
2023-02-22 15:41:29 -05:00
parent e79b6e2fca
commit f485ebdd3e
5 changed files with 64 additions and 11 deletions

View File

@@ -344,12 +344,15 @@ public:
}
virtual void reset() override {
this->recentMap = QString();
this->recentLayout = QString();
this->useEncounterJson = true;
this->customScripts.clear();
this->readKeys.clear();
}
void setRecentMap(const QString &map);
QString getRecentMap();
void setRecentLayout(const QString &map);
QString getRecentLayout();
void setEncounterJsonActive(bool active);
bool getEncounterJsonActive();
void setProjectDir(QString projectDir);
@@ -371,6 +374,7 @@ protected:
private:
QString projectDir;
QString recentMap;
QString recentLayout;
bool useEncounterJson;
QMap<QString, bool> customScripts;
QStringList readKeys;

View File

@@ -357,10 +357,12 @@ private:
bool tilesetNeedsRedraw = false;
bool setDefaultView();
bool setRecentView();
bool setLayout(QString layoutId);
bool setMap(QString, bool scroll = false);
void unsetMap();
void redrawMapScene();
void redrawLayoutScene();
void refreshMapScene();
@@ -373,7 +375,9 @@ private:
QString getExistingDirectory(QString);
bool openProject(QString dir);
QString getDefaultMap();
void setRecentMap(QString map_name);
QString getDefaultLayout();
void setRecentMapConfig(QString map_name);
void setRecentLayoutConfig(QString layoutId);
void updateMapList();