Formatting
This commit is contained in:
@@ -75,16 +75,23 @@ RemoveItems::RemoveItems(Playlist *playlist, int pos, int count) : Base(playlist
|
||||
}
|
||||
|
||||
void RemoveItems::redo() {
|
||||
for (int i = 0; i < ranges_.count(); ++i)
|
||||
|
||||
for (int i = 0; i < ranges_.count(); ++i) {
|
||||
ranges_[i].items_ = playlist_->RemoveItemsWithoutUndo(ranges_[i].pos_, ranges_[i].count_);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void RemoveItems::undo() {
|
||||
for (int i = static_cast<int>(ranges_.count() - 1); i >= 0; --i)
|
||||
|
||||
for (int i = static_cast<int>(ranges_.count() - 1); i >= 0; --i) {
|
||||
playlist_->InsertItemsWithoutUndo(ranges_[i].items_, ranges_[i].pos_);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool RemoveItems::mergeWith(const QUndoCommand *other) {
|
||||
|
||||
const RemoveItems *remove_command = static_cast<const RemoveItems*>(other);
|
||||
ranges_.append(remove_command->ranges_);
|
||||
|
||||
@@ -93,6 +100,7 @@ bool RemoveItems::mergeWith(const QUndoCommand *other) {
|
||||
setText(tr("remove %n songs", "", sum));
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user