summaryrefslogtreecommitdiff
path: root/fluid/undo.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-08-29 22:50:07 +0200
committerMatthias Melcher <github@matthiasm.com>2023-08-29 22:50:12 +0200
commitb5a1da961200e870a28f09b2fba4197e73c9935d (patch)
treec18917f0dea7f8203d020d60a2ff1d6c2cd12ff6 /fluid/undo.cxx
parentbe657471e761462d91c62e8cd00519e5dbda82a0 (diff)
FLUID: minor fixes
Diffstat (limited to 'fluid/undo.cxx')
-rw-r--r--fluid/undo.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/fluid/undo.cxx b/fluid/undo.cxx
index 21503b122..92f84a666 100644
--- a/fluid/undo.cxx
+++ b/fluid/undo.cxx
@@ -160,14 +160,15 @@ void undo_cb(Fl_Widget *, void *) {
// Save current file to undo buffer
void undo_checkpoint() {
- int undo_item = main_menubar->find_index(undo_cb);
- int redo_item = main_menubar->find_index(redo_cb);
// printf("undo_checkpoint(): undo_current=%d, undo_paused=%d, modflag=%d\n",
// undo_current, undo_paused, modflag);
// Don't checkpoint if undo_suspend() has been called...
if (undo_paused) return;
+ int undo_item = main_menubar->find_index(undo_cb);
+ int redo_item = main_menubar->find_index(redo_cb);
+
// Save the current UI to a checkpoint file...
const char *filename = undo_filename(undo_current);
if (!write_file(filename)) {