code cleanup
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <QDebug>
|
||||
#include <QTreeWidgetItem>
|
||||
#include <QMessageBox>
|
||||
#include <QCheckBox>
|
||||
|
||||
#include "project/clip.h"
|
||||
#include "project/sequence.h"
|
||||
@@ -383,3 +384,18 @@ void LinkCommand::redo() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CheckboxCommand::CheckboxCommand(QCheckBox* b) : box(b), done(true), checked(box->isChecked()) {}
|
||||
|
||||
CheckboxCommand::~CheckboxCommand() {}
|
||||
|
||||
void CheckboxCommand::undo() {
|
||||
box->setChecked(!checked);
|
||||
done = false;
|
||||
}
|
||||
|
||||
void CheckboxCommand::redo() {
|
||||
if (!done) {
|
||||
box->setChecked(checked);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user