Prevent deleting last frame of a level. (#63)
This commit is contained in:
parent
cd2074e3ed
commit
5780388172
1 changed files with 4 additions and 0 deletions
|
@ -281,6 +281,10 @@ void TFilmstripSelection::pasteInto() {
|
|||
void TFilmstripSelection::deleteFrames() {
|
||||
TXshSimpleLevel *sl = TApp::instance()->getCurrentLevel()->getSimpleLevel();
|
||||
if (sl) {
|
||||
if (sl->getFrameCount() <= 1) {
|
||||
DVGui::warning(QObject::tr("Can't delete the last drawing in a level."));
|
||||
return;
|
||||
}
|
||||
// find highest numbered frame
|
||||
int highestFrame = -1;
|
||||
TFrameId fid;
|
||||
|
|
Loading…
Reference in a new issue