You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Revert "Reordering emitted signals in PopupMenu" and fix editor selection issue in the safer way.
This commit is contained in:
@@ -1543,6 +1543,7 @@ void Node3DEditorViewport::_list_select(Ref<InputEventMouseButton> b) {
|
||||
selection_menu->set_item_tooltip(i, String(spat->get_name()) + "\nType: " + spat->get_class() + "\nPath: " + node_path);
|
||||
}
|
||||
|
||||
selection_results_menu = selection_results;
|
||||
selection_menu->set_position(get_screen_position() + b->get_position());
|
||||
selection_menu->reset_size();
|
||||
selection_menu->popup();
|
||||
@@ -3609,15 +3610,17 @@ void Node3DEditorViewport::_toggle_cinema_preview(bool p_activate) {
|
||||
}
|
||||
|
||||
void Node3DEditorViewport::_selection_result_pressed(int p_result) {
|
||||
if (selection_results.size() <= p_result) {
|
||||
if (selection_results_menu.size() <= p_result) {
|
||||
return;
|
||||
}
|
||||
|
||||
clicked = selection_results[p_result].item->get_instance_id();
|
||||
clicked = selection_results_menu[p_result].item->get_instance_id();
|
||||
|
||||
if (clicked.is_valid()) {
|
||||
_select_clicked(spatial_editor->get_tool_mode() == Node3DEditor::TOOL_MODE_SELECT);
|
||||
}
|
||||
|
||||
selection_results_menu.clear();
|
||||
}
|
||||
|
||||
void Node3DEditorViewport::_selection_menu_hide() {
|
||||
|
||||
Reference in New Issue
Block a user