From 79da4b792e8ea7228994c9883a54ee04fd4cc44f Mon Sep 17 00:00:00 2001 From: Johannes Winkler Date: Mon, 11 Mar 2024 14:49:00 +0100 Subject: [PATCH] simplification --- rotations/rotationdialog.cpp | 12 ++---------- rotations/rotationdialog.ui | 7 ------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/rotations/rotationdialog.cpp b/rotations/rotationdialog.cpp index 836f612..752f293 100644 --- a/rotations/rotationdialog.cpp +++ b/rotations/rotationdialog.cpp @@ -316,17 +316,9 @@ void RotationDialog::on_button_ok_clicked() opt->undoDB.append(opt->data); QJsonArray sprites = opt->data.value("sprites").toArray(); - - int skip = 1; //insert 1 later when original is kept - if (this->ui->check_replace->isChecked()) - { - sprites.removeAt(opt->current_sprite); - skip = 0; - } - - for (int i = 0; i < result_list.count(); i++) + for (int i = 1; i < result_list.count(); i++) { - sprites.insert(opt->current_sprite+skip+i, result_list.at(i)); + sprites.insert(opt->current_sprite+i, result_list.at(i)); } opt->data.insert("sprites", sprites); diff --git a/rotations/rotationdialog.ui b/rotations/rotationdialog.ui index ae26e4f..7c41d7a 100644 --- a/rotations/rotationdialog.ui +++ b/rotations/rotationdialog.ui @@ -90,13 +90,6 @@ - - - - Replace original - - -