Sheet: enable Split action only if only one merged cell is selected

Both main menu and context menu
 Partially fixes #6744
This commit is contained in:
0penBrain
2022-04-13 16:51:15 +02:00
committed by Chris Hennes
parent 2a002e3df6
commit 384f56fe65
5 changed files with 18 additions and 2 deletions

View File

@@ -162,7 +162,10 @@ bool CmdSpreadsheetSplitCell::isActive()
Sheet * sheet = sheetView->getSheet();
if (current.isValid())
return sheet->isMergedCell(CellAddress(current.row(), current.column()));
{
return (sheetView->selectedIndexesRaw().size() == 1 &&
sheet->isMergedCell(CellAddress(current.row(), current.column())));
}
}
}
return false;