|
|
@@ -1208,13 +1208,12 @@ void LineEdit::undo() {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (!has_undo()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
if (undo_stack_pos == nullptr) {
|
|
|
- if (undo_stack.size() <= 1) {
|
|
|
- return;
|
|
|
- }
|
|
|
undo_stack_pos = undo_stack.back();
|
|
|
- } else if (undo_stack_pos == undo_stack.front()) {
|
|
|
- return;
|
|
|
}
|
|
|
|
|
|
deselect();
|
|
|
@@ -1234,10 +1233,7 @@ void LineEdit::redo() {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (undo_stack_pos == nullptr) {
|
|
|
- return;
|
|
|
- }
|
|
|
- if (undo_stack_pos == undo_stack.back()) {
|
|
|
+ if (!has_redo()) {
|
|
|
return;
|
|
|
}
|
|
|
|