Simplify saving the map list tab

This commit is contained in:
GriffinR
2024-10-28 16:02:17 -04:00
parent a18b2c960b
commit 3bd5ddbf2f
6 changed files with 31 additions and 79 deletions

View File

@@ -22,12 +22,6 @@ static const QVersionNumber porymapVersion = QVersionNumber::fromString(PORYMAP_
#define CONFIG_BACKWARDS_COMPATABILITY
enum MapSortOrder {
SortByGroup = 0,
SortByArea = 1,
SortByLayout = 2,
};
class KeyValueConfigBase
{
public:
@@ -56,7 +50,7 @@ public:
this->recentProjects.clear();
this->projectManuallyClosed = false;
this->reopenOnLaunch = true;
this->mapSortOrder = MapSortOrder::SortByGroup;
this->mapListTab = 0;
this->prettyCursors = true;
this->mirrorConnectingMaps = true;
this->showDiveEmergeMaps = false;
@@ -107,7 +101,7 @@ public:
bool reopenOnLaunch;
bool projectManuallyClosed;
MapSortOrder mapSortOrder;
int mapListTab;
bool prettyCursors;
bool mirrorConnectingMaps;
bool showDiveEmergeMaps;

View File

@@ -242,11 +242,7 @@ private slots:
void on_toolButton_Move_clicked();
void on_toolButton_Shift_clicked();
void on_mapListContainer_currentChanged(int index);
void onOpenMapListContextMenu(const QPoint &point);
void onAddNewMapToGroupClick(QAction* triggeredAction);
void onAddNewMapToAreaClick(QAction* triggeredAction);
void onAddNewMapToLayoutClick(QAction* triggeredAction);
void currentMetatilesSelectionChanged();
void on_action_Export_Map_Image_triggered();
@@ -393,6 +389,7 @@ private:
void mapListRemoveArea();
void mapListRemoveLayout();
void openMapListItem(const QModelIndex &index);
void saveMapListTab(int index);
void displayMapProperties();
void checkToolButtons();

View File

@@ -24,7 +24,7 @@ public:
QString layoutId;
void init();
void initUi();
void init(MapSortOrder type, QVariant data);
void init(int tabIndex, QVariant data);
void init(Layout *);
static void setDefaultSettings(Project *project);