From a6d62b6daaf2e81eee1bc6fdb83643aa04bd085f Mon Sep 17 00:00:00 2001 From: Rodney Date: Nov 09 2021 14:39:34 +0000 Subject: Merge pull request #4141 from shun-iwasawa/fix_undo_pasting_raster_selection_to_cell Fix undo pasting raster selection to cell --- diff --git a/toonz/sources/toonz/cellselection.cpp b/toonz/sources/toonz/cellselection.cpp index e83df71..bd8f000 100644 --- a/toonz/sources/toonz/cellselection.cpp +++ b/toonz/sources/toonz/cellselection.cpp @@ -1662,6 +1662,12 @@ static void pasteRasterImageInCell(int row, int col, if (!isPaste) return; cell = xsh->getCell(row, col); + // The flag TTool::m_isLevelRenumbererd is evaluated in the undo. + // We need to reset the flag here as the operation does not call + // TTool::touchImage(). Currently the flag can be always false as the + // operation does not renumber cells regardless of the preferences. + TTool::m_isLevelRenumbererd = false; + TTileSetCM32 *cm32Tiles = dynamic_cast(tiles); TTileSetFullColor *fullColorTiles = dynamic_cast(tiles); if (cm32Tiles) {