Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes 2D bones selection #24871

Merged
merged 1 commit into from
Jan 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixes 2D bones selection
  • Loading branch information
groud committed Jan 9, 2019
commit c48f92e394220b992648eeb8d871ed290786d286
13 changes: 8 additions & 5 deletions editor/plugins/canvas_item_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2033,16 +2033,19 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {

// Find the item to select
CanvasItem *canvas_item = NULL;
Vector<_SelectResult> selection;

// Retrieve the items
_get_canvas_items_at_pos(click, selection);

// Retrieve the bones
Vector<_SelectResult> selection = Vector<_SelectResult>();
_get_bones_at_pos(click, selection);

if (!selection.empty()) {
canvas_item = selection[0].item;
} else {
// Retrieve the canvas items
selection = Vector<_SelectResult>();
_get_canvas_items_at_pos(click, selection);
if (!selection.empty()) {
canvas_item = selection[0].item;
}
}

if (!canvas_item) {
Expand Down