Block image tools on stop frames

This commit is contained in:
manongjohn 2021-12-25 18:17:03 -05:00
parent 8ae0d4c157
commit f48cd7b170

View file

@ -353,6 +353,10 @@ TImage *TTool::touchImage() {
if (!xsh) return 0;
TXshCell cell = xsh->getCell(row, col);
// Stop frames cannot be modified
if (cell.getFrameId().isStopFrame()) return 0;
TXshSimpleLevel *sl = cell.getSimpleLevel();
if (sl) {
@ -1108,6 +1112,13 @@ QString TTool::updateEnabled(int rowIndex, int columnIndex) {
"frames of a Single Frame level."));
}
}
// Stop frames cannot be modified
if (xsh->getCell(rowIndex, columnIndex).getFrameId().isStopFrame()) {
return (
enable(false),
QObject::tr("The current tool cannot be used on a stop frame."));
}
}
}