[nostalgia/core/studio] Adjust size of SubSheet Editor in cases without size input

This commit is contained in:
2022-03-05 18:29:50 -06:00
parent 94653cb9af
commit e0b2f37925
2 changed files with 10 additions and 3 deletions
@@ -206,7 +206,12 @@ struct UpdateSubSheetCommand: public studio::UndoCommand {
sheet.name = m_newName;
sheet.columns = m_newCols;
sheet.rows = m_newRows;
oxLogError(sheet.setPixelCount(m_img->bpp, static_cast<std::size_t>(m_newCols * m_newRows)));
oxDebugf("old cols: {}, old rows: {}", sheet.columns, sheet.rows);
oxDebugf("new cols: {}, new rows: {}", m_newCols, m_newRows);
oxDebugf("bpp: {}", m_img->bpp);
oxDebugf("pixel count before: {}", sheet.pixels.size());
oxLogError(sheet.setPixelCount(m_img->bpp, static_cast<std::size_t>(PixelsPerTile * m_newCols * m_newRows)));
oxDebugf("pixel count after: {}", sheet.pixels.size());
}
void undo() noexcept final {