Skip to content

Commit b90342e

Browse files
author
Federico-Giusti
committed
Gridmap editor: Clear clipboard data when undoing Cut
1 parent 30456ba commit b90342e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/gridmap/editor/grid_map_editor_plugin.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ void GridMapEditor::_delete_selection() {
478478
}
479479
undo_redo->add_do_method(this, "_set_selection", !selection.active, selection.begin, selection.end);
480480
undo_redo->add_undo_method(this, "_set_selection", selection.active, selection.begin, selection.end);
481+
undo_redo->add_undo_method(this, "_clear_clipboard_data");
481482
undo_redo->commit_action();
482483
}
483484

@@ -1299,6 +1300,7 @@ void GridMapEditor::_floor_mouse_exited() {
12991300
void GridMapEditor::_bind_methods() {
13001301
ClassDB::bind_method("_configure", &GridMapEditor::_configure);
13011302
ClassDB::bind_method("_set_selection", &GridMapEditor::_set_selection);
1303+
ClassDB::bind_method("_clear_clipboard_data", &GridMapEditor::_clear_clipboard_data);
13021304
}
13031305

13041306
GridMapEditor::GridMapEditor() {

0 commit comments

Comments
 (0)