Corrected logic for empty cells
This commit is contained in:
parent
592b09d168
commit
f3163f8dfc
2 changed files with 8 additions and 1 deletions
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue