X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fmainundo.C;h=a0aec63baf641caeef00ca699c33b61757faa89c;hb=8ab335aafbd648cad728f18e01153715a4e59eef;hp=bd048c10de5fa84fcc816206386b8079b753192c;hpb=ae3fc4be2e74120251506615bb29b853c6e10ff6;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/mainundo.C b/cinelerra-5.1/cinelerra/mainundo.C index bd048c10..a0aec63b 100644 --- a/cinelerra-5.1/cinelerra/mainundo.C +++ b/cinelerra-5.1/cinelerra/mainundo.C @@ -190,11 +190,13 @@ int MainUndo::redo_load_flags() int MainUndo::undo() { mwindow->undo_commercial(); - - UndoStackItem *current = next_undo(); -// Now have an even number + UndoStackItem *current = undo_stack->current; + if( current ) { + undo_stack->current = next_undo(); + if( undo_stack->number_of(current) % 2 ) + current = PREVIOUS; // Now have an even number + } if( current ) { - undo_stack->current = current; // Set the redo text to the current description if( mwindow->gui ) { UndoStackItem *next = NEXT;