mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-19 23:25:09 -05:00
Fix some problems with layout directory creation
This commit is contained in:
@@ -67,12 +67,10 @@ public:
|
||||
QString sharedEventsMap() const { return m_sharedEventsMap; }
|
||||
QString sharedScriptsMap() const { return m_sharedScriptsMap; }
|
||||
|
||||
void setNeedsLayoutDir(bool needsLayoutDir) { m_needsLayoutDir = needsLayoutDir; }
|
||||
void setNeedsHealLocation(bool needsHealLocation) { m_needsHealLocation = needsHealLocation; }
|
||||
void setIsPersistedToFile(bool persistedToFile) { m_isPersistedToFile = persistedToFile; }
|
||||
void setHasUnsavedDataChanges(bool unsavedDataChanges) { m_hasUnsavedDataChanges = unsavedDataChanges; }
|
||||
|
||||
bool needsLayoutDir() const { return m_needsLayoutDir; }
|
||||
bool needsHealLocation() const { return m_needsHealLocation; }
|
||||
bool isPersistedToFile() const { return m_isPersistedToFile; }
|
||||
bool hasUnsavedDataChanges() const { return m_hasUnsavedDataChanges; }
|
||||
@@ -121,7 +119,6 @@ private:
|
||||
|
||||
bool m_isPersistedToFile = true;
|
||||
bool m_hasUnsavedDataChanges = false;
|
||||
bool m_needsLayoutDir = true;
|
||||
bool m_needsHealLocation = false;
|
||||
bool m_scriptsLoaded = false;
|
||||
|
||||
|
||||
@@ -22,8 +22,9 @@ public:
|
||||
Layout() {}
|
||||
Layout(const Layout &other);
|
||||
|
||||
static QString layoutNameFromMapName(const QString &mapName);
|
||||
static QString layoutConstantFromName(QString mapName);
|
||||
static QString defaultSuffix();
|
||||
|
||||
|
||||
bool loaded = false;
|
||||
|
||||
@@ -77,6 +78,9 @@ public:
|
||||
struct Settings {
|
||||
QString id;
|
||||
QString name;
|
||||
// The name of a new layout's folder in `data/layouts/` is not always the same as the layout's name
|
||||
// (e.g. the majority of the default layouts use the name of their associated map).
|
||||
QString folderName;
|
||||
int width;
|
||||
int height;
|
||||
int borderWidth;
|
||||
|
||||
@@ -40,7 +40,6 @@ private:
|
||||
|
||||
void refresh();
|
||||
void saveSettings();
|
||||
void setLayout(const Layout *mapLayout);
|
||||
|
||||
private slots:
|
||||
void dialogButtonClicked(QAbstractButton *button);
|
||||
|
||||
Reference in New Issue
Block a user