mirror of
https://github.com/huderlem/porymap.git
synced 2026-09-26 18:06:32 -05:00
Fix tileset palette saving crash
This commit is contained in:
@@ -58,6 +58,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
|
||||
- Fix some file dialogs returning to an incorrect window when closed.
|
||||
- Fix bug where reloading a layout would overwrite all unsaved changes.
|
||||
- Fix bug where layout json and blockdata could be saved separately leading to inconsistent data.
|
||||
- Fix crash when saving tilesets with fewer palettes than the maximum.
|
||||
|
||||
## [5.4.1] - 2024-03-21
|
||||
### Fixed
|
||||
|
||||
@@ -1130,7 +1130,8 @@ void Project::saveTilesetTilesImage(Tileset *tileset) {
|
||||
}
|
||||
|
||||
void Project::saveTilesetPalettes(Tileset *tileset) {
|
||||
for (int i = 0; i < Project::getNumPalettesTotal(); i++) {
|
||||
int numPalettes = qMin(tileset->palettePaths.length(), tileset->palettes.length());
|
||||
for (int i = 0; i < numPalettes; i++) {
|
||||
QString filepath = tileset->palettePaths.at(i);
|
||||
PaletteUtil::writeJASC(filepath, tileset->palettes.at(i).toVector(), 0, 16);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user