From 5d63cd28989572b2820125458e57eaf3ef14f882 Mon Sep 17 00:00:00 2001 From: manongjohn Date: Sun, 2 Jan 2022 17:59:59 -0500 Subject: [PATCH] Ignore Each # action when range selection is less than Each # --- toonz/sources/toonz/cellselectioncommand.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/toonz/sources/toonz/cellselectioncommand.cpp b/toonz/sources/toonz/cellselectioncommand.cpp index ba3f9fbf..40a45780 100644 --- a/toonz/sources/toonz/cellselectioncommand.cpp +++ b/toonz/sources/toonz/cellselectioncommand.cpp @@ -544,6 +544,9 @@ void EachUndo::undo() const { void TCellSelection::eachCells(int each) { if (isEmpty() || areAllColSelectedLocked()) return; + // Do nothing if they select less than Each # + if ((m_range.m_r1 - m_range.m_r0 + 1) < each) return; + TUndo *undo = new EachUndo(m_range.m_r0, m_range.m_c0, m_range.m_r1, m_range.m_c1, each); TUndoManager::manager()->add(undo);