mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-12 11:55:44 -05:00
Automatically save selected tabs
Some checks failed
Build Porymap / build-linux (, 5.14.2) (push) Has been cancelled
Build Porymap / build-linux (, 6.8.*) (push) Has been cancelled
Build Porymap / build-linux (minimal, 5.14.2) (push) Has been cancelled
Build Porymap / build-macos (macos-15-intel) (push) Has been cancelled
Build Porymap / build-macos (macos-latest) (push) Has been cancelled
Build Porymap / build-static-windows (push) Has been cancelled
Some checks failed
Build Porymap / build-linux (, 5.14.2) (push) Has been cancelled
Build Porymap / build-linux (, 6.8.*) (push) Has been cancelled
Build Porymap / build-linux (minimal, 5.14.2) (push) Has been cancelled
Build Porymap / build-macos (macos-15-intel) (push) Has been cancelled
Build Porymap / build-macos (macos-latest) (push) Has been cancelled
Build Porymap / build-static-windows (push) Has been cancelled
This commit is contained in:
@@ -45,7 +45,6 @@ public:
|
||||
|
||||
bool reopenOnLaunch = true;
|
||||
bool projectManuallyClosed = false;
|
||||
int mapListTab = 0;
|
||||
bool mapListEditGroupsEnabled = false;
|
||||
OrderedSet<int> mapListTabsHidingEmptyFolders;
|
||||
bool mapListLayoutsSorted = true;
|
||||
@@ -80,7 +79,6 @@ public:
|
||||
QString textEditorOpenFolder;
|
||||
QString textEditorGotoLine;
|
||||
int paletteEditorBitDepth = 24;
|
||||
int projectSettingsTab = 0;
|
||||
ScriptAutocompleteMode scriptAutocompleteMode = ScriptAutocompleteMode::MapOnly;
|
||||
bool warpBehaviorWarningDisabled = false;
|
||||
bool eventDeleteWarningDisabled = false;
|
||||
@@ -113,7 +111,6 @@ public:
|
||||
m_fm = std::make_shared<FieldManager>();
|
||||
m_fm->addField(&this->reopenOnLaunch, "reopen_on_launch");
|
||||
m_fm->addField(&this->projectManuallyClosed, "project_manually_closed");
|
||||
m_fm->addField(&this->mapListTab, "map_list_tab", 0, 2);
|
||||
m_fm->addField(&this->mapListEditGroupsEnabled, "map_list_edit_groups_enabled");
|
||||
m_fm->addField(&this->mapListTabsHidingEmptyFolders, "map_list_tabs_hiding_empty_folders");
|
||||
m_fm->addField(&this->mapListLayoutsSorted, "map_list_layouts_sorted");
|
||||
@@ -148,7 +145,6 @@ public:
|
||||
m_fm->addField(&this->textEditorOpenFolder, "text_editor_open_folder");
|
||||
m_fm->addField(&this->textEditorGotoLine, "text_editor_goto_line");
|
||||
m_fm->addField(&this->paletteEditorBitDepth, "palette_editor_bit_depth", {24,15});
|
||||
m_fm->addField(&this->projectSettingsTab, "project_settings_tab");
|
||||
m_fm->addField(&this->scriptAutocompleteMode, "script_autocomplete_mode");
|
||||
m_fm->addField(&this->warpBehaviorWarningDisabled, "warp_behavior_warning_disabled");
|
||||
m_fm->addField(&this->eventDeleteWarningDisabled, "event_delete_warning_disabled");
|
||||
@@ -179,6 +175,11 @@ protected:
|
||||
virtual QJsonObject getDefaultJson() const override;
|
||||
|
||||
private:
|
||||
static QList<QWidget*> findChildrenWithStates(const QWidget* widget);
|
||||
static QByteArray getWidgetState(const QWidget* widget);
|
||||
static void restoreWidgetState(QWidget* widget, const QByteArray& state);
|
||||
|
||||
|
||||
std::shared_ptr<FieldManager> m_fm = nullptr;
|
||||
QStringList recentProjects;
|
||||
QMap<QString, QByteArray> savedGeometryMap;
|
||||
|
||||
@@ -302,7 +302,6 @@ private slots:
|
||||
void on_actionOpen_Manual_triggered();
|
||||
void on_actionCheck_for_Updates_triggered();
|
||||
void togglePreferenceSpecificUi();
|
||||
void on_actionProject_Settings_triggered();
|
||||
void on_actionPlugins_triggered();
|
||||
void reloadScriptEngine();
|
||||
void on_actionShow_Grid_triggered();
|
||||
@@ -420,7 +419,7 @@ private:
|
||||
void setMapListSorted(MapTree *list, bool sort);
|
||||
void updateMapList();
|
||||
void openMapListItem(const QModelIndex &index);
|
||||
void onMapListTabChanged(int index);
|
||||
void setMapListTab(int index);
|
||||
QString getActiveItemName();
|
||||
void recordMapNavigation(const QString &itemName);
|
||||
void resetMapNavigation();
|
||||
@@ -456,7 +455,7 @@ private:
|
||||
void initShortcutsEditor();
|
||||
void initPluginEditor();
|
||||
void connectSubEditorsToShortcutsEditor();
|
||||
void openProjectSettingsEditor(int tab);
|
||||
void openProjectSettingsEditor(int tab = -1);
|
||||
bool isProjectOpen();
|
||||
void showExportMapImageWindow(ImageExporterMode mode);
|
||||
double getMetatilesZoomScale();
|
||||
|
||||
@@ -81,7 +81,6 @@ private slots:
|
||||
void updateAttributeLimits(const QString &attrSize);
|
||||
void updatePokemonIconPath(const QString &species);
|
||||
void markEdited();
|
||||
void on_mainTabs_tabBarClicked(int index);
|
||||
void updateBlockMaskOverlapWarning();
|
||||
void updateAttributeMaskOverlapWarning();
|
||||
void updateWarpBehaviorsList(bool adding);
|
||||
|
||||
Reference in New Issue
Block a user