diff options
| author | Rémi Verschelde | 2017-10-20 12:42:35 +0200 |
|---|---|---|
| committer | GitHub | 2017-10-20 12:42:35 +0200 |
| commit | 84251d7aec34709d9ab89390e9576a05ab925127 (patch) | |
| tree | f455d3f6e614904189df9365866ff5ffd2da4fb1 /editor/plugins/tile_map_editor_plugin.cpp | |
| parent | 3517e791cef631318880c68a5712aebfa7eaec49 (diff) | |
| parent | 907970aab69689b4c37ced90548c42b01664102e (diff) | |
| download | godot-84251d7aec34709d9ab89390e9576a05ab925127.tar.gz godot-84251d7aec34709d9ab89390e9576a05ab925127.tar.zst godot-84251d7aec34709d9ab89390e9576a05ab925127.zip | |
Merge pull request #12195 from groud/fix_snapping
Fix snapping with 2D nodes
[ci skip]
Diffstat (limited to 'editor/plugins/tile_map_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/tile_map_editor_plugin.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index 2f2ed7bdf..d12b3f1e0 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -229,7 +229,7 @@ struct _PaletteEntry { return name < p_rhs.name; } }; -} +} // namespace void TileMapEditor::_update_palette() { @@ -1152,7 +1152,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) { return false; } -void TileMapEditor::_canvas_draw() { +void TileMapEditor::forward_draw_over_canvas(Control *p_canvas) { if (!node) return; @@ -1379,8 +1379,6 @@ void TileMapEditor::edit(Node *p_tile_map) { if (p_tile_map) { node = Object::cast_to<TileMap>(p_tile_map); - if (!canvas_item_editor->is_connected("draw", this, "_canvas_draw")) - canvas_item_editor->connect("draw", this, "_canvas_draw"); if (!canvas_item_editor->is_connected("mouse_entered", this, "_canvas_mouse_enter")) canvas_item_editor->connect("mouse_entered", this, "_canvas_mouse_enter"); if (!canvas_item_editor->is_connected("mouse_exited", this, "_canvas_mouse_exit")) @@ -1391,8 +1389,6 @@ void TileMapEditor::edit(Node *p_tile_map) { } else { node = NULL; - if (canvas_item_editor->is_connected("draw", this, "_canvas_draw")) - canvas_item_editor->disconnect("draw", this, "_canvas_draw"); if (canvas_item_editor->is_connected("mouse_entered", this, "_canvas_mouse_enter")) canvas_item_editor->disconnect("mouse_entered", this, "_canvas_mouse_enter"); if (canvas_item_editor->is_connected("mouse_exited", this, "_canvas_mouse_exit")) @@ -1428,7 +1424,6 @@ void TileMapEditor::_bind_methods() { ClassDB::bind_method(D_METHOD("_text_changed"), &TileMapEditor::_text_changed); ClassDB::bind_method(D_METHOD("_sbox_input"), &TileMapEditor::_sbox_input); ClassDB::bind_method(D_METHOD("_menu_option"), &TileMapEditor::_menu_option); - ClassDB::bind_method(D_METHOD("_canvas_draw"), &TileMapEditor::_canvas_draw); ClassDB::bind_method(D_METHOD("_canvas_mouse_enter"), &TileMapEditor::_canvas_mouse_enter); ClassDB::bind_method(D_METHOD("_canvas_mouse_exit"), &TileMapEditor::_canvas_mouse_exit); ClassDB::bind_method(D_METHOD("_tileset_settings_changed"), &TileMapEditor::_tileset_settings_changed); |
