Fix select and edit invisble items in SubViewports
This commit is contained in:
parent
893bbdfde8
commit
93e06ff16c
8 changed files with 87 additions and 3 deletions
|
|
@ -34,6 +34,7 @@
|
|||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "editor/editor_undo_redo_manager.h"
|
||||
#include "scene/main/viewport.h"
|
||||
#include "servers/navigation_server_3d.h"
|
||||
|
||||
void NavigationLink2DEditor::_notification(int p_what) {
|
||||
|
|
@ -59,6 +60,11 @@ bool NavigationLink2DEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_e
|
|||
return false;
|
||||
}
|
||||
|
||||
Viewport *vp = node->get_viewport();
|
||||
if (vp && !vp->is_visible_subviewport()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
real_t grab_threshold = EDITOR_GET("editors/polygon_editor/point_grab_radius");
|
||||
Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_screen_transform();
|
||||
|
||||
|
|
@ -142,6 +148,11 @@ void NavigationLink2DEditor::forward_canvas_draw_over_viewport(Control *p_overla
|
|||
return;
|
||||
}
|
||||
|
||||
Viewport *vp = node->get_viewport();
|
||||
if (vp && !vp->is_visible_subviewport()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Transform2D gt = canvas_item_editor->get_canvas_transform() * node->get_screen_transform();
|
||||
Vector2 global_start_position = gt.xform(node->get_start_position());
|
||||
Vector2 global_end_position = gt.xform(node->get_end_position());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue