mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-28 03:25:30 -05:00
create edit history for region map tilemap and layout
This commit is contained in:
@@ -45,9 +45,6 @@ public:
|
||||
void onRegionMapEntriesSelectedTileChanged(QString) {};
|
||||
void onRegionMapEntryDragged(int, int);
|
||||
|
||||
void undo();
|
||||
void redo();
|
||||
|
||||
void resize(int width, int height);
|
||||
|
||||
QObjectList shortcutableObjects() const;
|
||||
@@ -61,7 +58,7 @@ private:
|
||||
|
||||
poryjson::Json rmConfigJson;
|
||||
|
||||
History<RegionMapHistoryItem*> history;
|
||||
QUndoGroup history;
|
||||
|
||||
int currIndex = 0;
|
||||
unsigned selectedCityTile;
|
||||
@@ -124,8 +121,6 @@ private:
|
||||
|
||||
private slots:
|
||||
void on_action_RegionMap_Save_triggered();
|
||||
void on_action_RegionMap_Undo_triggered();
|
||||
void on_action_RegionMap_Redo_triggered();
|
||||
void on_action_RegionMap_Resize_triggered();
|
||||
void on_action_RegionMap_ClearImage_triggered();
|
||||
void on_action_RegionMap_ClearLayout_triggered();
|
||||
|
||||
@@ -123,7 +123,9 @@ public:
|
||||
this->tileset = QImage(tilesetFilepath);
|
||||
this->format = format;
|
||||
bool err;
|
||||
this->palette = PaletteUtil::parse(palFilepath, &err);
|
||||
if (!palFilepath.isEmpty()) {
|
||||
this->palette = PaletteUtil::parse(palFilepath, &err);
|
||||
}
|
||||
this->setPixmap(QPixmap::fromImage(this->tileset));
|
||||
this->numTilesWide = this->tileset.width() / 8;
|
||||
this->selectedTile = 0x00;
|
||||
|
||||
Reference in New Issue
Block a user