mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 03:18:37 +08:00
Merge pull request #77148 from ajreckof/prevent_unselectable_editor_property_from_being_selected_on_RMB
Prevent selecting unselectable `EditorProperty` with RMB
This commit is contained in:
commit
5b5186383e
@ -598,6 +598,9 @@ void EditorProperty::add_focusable(Control *p_control) {
|
||||
|
||||
void EditorProperty::select(int p_focusable) {
|
||||
bool already_selected = selected;
|
||||
if (!selectable) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (p_focusable >= 0) {
|
||||
ERR_FAIL_INDEX(p_focusable, focusables.size());
|
||||
@ -671,11 +674,7 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) {
|
||||
mpos.x = get_size().x - mpos.x;
|
||||
}
|
||||
|
||||
if (!selected && selectable) {
|
||||
selected = true;
|
||||
emit_signal(SNAME("selected"), property, -1);
|
||||
queue_redraw();
|
||||
}
|
||||
select();
|
||||
|
||||
if (keying_rect.has_point(mpos)) {
|
||||
accept_event();
|
||||
|
Loading…
Reference in New Issue
Block a user