diff options
| author | aura <nw@moneybot.cc> | 2026-07-28 19:11:34 +0200 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-07-28 19:11:34 +0200 |
| commit | 86d248ed2b033fe36ce53b0387b2cbdcb69c0b72 (patch) | |
| tree | a70f32a0f44b927a6d137998efa405e330689c0f /src/editor/view2d.cpp | |
| parent | 468813b133a6a3ff0b85d3b34f1009cfeae815e4 (diff) | |
finish undo/redo
Diffstat (limited to 'src/editor/view2d.cpp')
| -rw-r--r-- | src/editor/view2d.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/editor/view2d.cpp b/src/editor/view2d.cpp index cca83d1..fe82c08 100644 --- a/src/editor/view2d.cpp +++ b/src/editor/view2d.cpp @@ -1047,8 +1047,8 @@ void gui_editor_2dview_input_select_ondrop( GUI_EDITOR_2DVIEW* view ) { gui_editor_propview_select( editor->gui.props, view->curdrag, view->dragtype, !input.keys[SDL_SCANCODE_LCTRL] ); if( view->pending_undo_props.changes.size ) { - EDITOR_UNDO_ACTION rec{ .type = EDITOR_UNDO_EDITPROPS, .props = view->pending_undo_props }; - editor->undo_actions.push( rec ); + EDITOR_UNDO_ACTION rec{ .typemask = EDITOR_UNDO_EDITPROPS, .props = view->pending_undo_props }; + editor_push_undo_action( editor, rec ); view->pending_undo_props = {}; } @@ -1109,7 +1109,7 @@ void gui_editor_2dview_input_select_drag( GUI_EDITOR_2DVIEW* view ) { return; } - EDITOR_UNDO_ACTION rec{ .type = EDITOR_UNDO_EDITPROPS }; + EDITOR_UNDO_ACTION rec{ .typemask = EDITOR_UNDO_EDITPROPS }; EDITOR_UNDO_PROPS::CHANGES changes{ .obj = (EOBJECT*)view->curdrag }; if( !gui_editor_2dview_input_select_drag_obj( view, view->curdrag, view->dragtype ) ) { view->oldmx = mx; |
