diff options
| author | Carl Olsson | 2015-03-23 08:19:20 +1000 |
|---|---|---|
| committer | Carl Olsson | 2015-03-23 08:19:20 +1000 |
| commit | fb2cdfe7edcc2ccafea7604afd104f582e5b9c17 (patch) | |
| tree | d9555d9519648f95d7ed3663fbca50978bb12a1f /tools/editor/plugins/navigation_polygon_editor_plugin.cpp | |
| parent | 41686d5fdd0d72f167894f976d19b177789f1f63 (diff) | |
| parent | e9f94ce8d2cc6805e74fffdf733e6dc5b5c530f5 (diff) | |
| download | godot-fb2cdfe7edcc2ccafea7604afd104f582e5b9c17.tar.gz godot-fb2cdfe7edcc2ccafea7604afd104f582e5b9c17.tar.zst godot-fb2cdfe7edcc2ccafea7604afd104f582e5b9c17.zip | |
Merge branch 'master' of https://github.com/not-surt/godot into snapping2
Conflicts:
tools/editor/plugins/canvas_item_editor_plugin.cpp
tools/editor/plugins/canvas_item_editor_plugin.h
Diffstat (limited to 'tools/editor/plugins/navigation_polygon_editor_plugin.cpp')
| -rw-r--r-- | tools/editor/plugins/navigation_polygon_editor_plugin.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/editor/plugins/navigation_polygon_editor_plugin.cpp b/tools/editor/plugins/navigation_polygon_editor_plugin.cpp index 2a32a2216..bc15741d0 100644 --- a/tools/editor/plugins/navigation_polygon_editor_plugin.cpp +++ b/tools/editor/plugins/navigation_polygon_editor_plugin.cpp @@ -36,6 +36,9 @@ void NavigationPolygonEditor::_node_removed(Node *p_node) { void NavigationPolygonEditor::_create_nav() { + if (!node) + return; + undo_redo->create_action("Create Navigation Polygon"); undo_redo->add_do_method(node,"set_navigation_polygon",Ref<NavigationPolygon>(memnew( NavigationPolygon))); undo_redo->add_undo_method(node,"set_navigation_polygon",Variant(REF())); @@ -96,7 +99,7 @@ bool NavigationPolygonEditor::forward_input_event(const InputEvent& p_event) { create_nav->set_text("No NavigationPolygon resource on this node.\nCreate and assign one?"); create_nav->popup_centered_minsize(); } - return false; + return (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==1);; } @@ -434,6 +437,7 @@ void NavigationPolygonEditor::edit(Node *p_collision_polygon) { wip.clear(); wip_active=false; edited_point=-1; + canvas_item_editor->get_viewport_control()->update(); } else { node=NULL; |
