Fix disabled tab can be enabled via rearranging inside TabContainer
This commit is contained in:
parent
ff65d33e8c
commit
ca2b7c59c0
1 changed files with 7 additions and 3 deletions
|
@ -401,7 +401,10 @@ void TabContainer::_drop_data_fw(const Point2 &p_point, const Variant &p_data, C
|
|||
}
|
||||
|
||||
move_child(get_tab_control(tab_from_id), get_tab_control(hover_now)->get_index(false));
|
||||
set_current_tab(hover_now);
|
||||
if (!is_tab_disabled(hover_now)) {
|
||||
set_current_tab(hover_now);
|
||||
}
|
||||
|
||||
} else if (get_tabs_rearrange_group() != -1) {
|
||||
// Drag and drop between TabContainers.
|
||||
Node *from_node = get_node(from_path);
|
||||
|
@ -416,8 +419,9 @@ void TabContainer::_drop_data_fw(const Point2 &p_point, const Variant &p_data, C
|
|||
}
|
||||
|
||||
move_child(moving_tabc, get_tab_control(hover_now)->get_index(false));
|
||||
|
||||
set_current_tab(hover_now);
|
||||
if (!is_tab_disabled(hover_now)) {
|
||||
set_current_tab(hover_now);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue