diff --git a/toonz/sources/tnztools/tool.cpp b/toonz/sources/tnztools/tool.cpp index 17b8fb8..5325ed0 100644 --- a/toonz/sources/tnztools/tool.cpp +++ b/toonz/sources/tnztools/tool.cpp @@ -801,7 +801,8 @@ QString TTool::updateEnabled(int rowIndex, int columnIndex) { // If not in Level editor, let's use our current cell from the xsheet to // find the nearest level before it - if (!m_application->getCurrentFrame()->isEditingLevel()) { + if (levelType == NO_XSHLEVEL && + !m_application->getCurrentFrame()->isEditingLevel()) { TXshCell cell = xsh->getCell(rowIndex, columnIndex); xl = cell.isEmpty() ? 0 : (TXshLevel *)(&cell.m_level); sl = cell.isEmpty() ? 0 : cell.getSimpleLevel(); diff --git a/toonz/sources/toonz/toolbar.cpp b/toonz/sources/toonz/toolbar.cpp index 4938915..7270912 100755 --- a/toonz/sources/toonz/toolbar.cpp +++ b/toonz/sources/toonz/toolbar.cpp @@ -118,6 +118,12 @@ void Toolbar::updateToolbar(bool forceReset) { rowIndex = r; break; } + + if (levelType == NO_XSHLEVEL) { + TXshCell cell = xsh->getCell(r0, colIndex); + levelType = cell.m_level->getType(); + rowIndex = r0; + } } } }