Fix tab renaming not updating its size in Tabs
This commit is contained in:
parent
01f692c173
commit
edf3d225ce
1 changed files with 1 additions and 1 deletions
|
@ -241,6 +241,7 @@ void Tabs::_shape(int p_tab) {
|
||||||
|
|
||||||
tabs.write[p_tab].xl_text = atr(tabs[p_tab].text);
|
tabs.write[p_tab].xl_text = atr(tabs[p_tab].text);
|
||||||
tabs.write[p_tab].text_buf->clear();
|
tabs.write[p_tab].text_buf->clear();
|
||||||
|
tabs.write[p_tab].text_buf->set_width(-1);
|
||||||
if (tabs[p_tab].text_direction == Control::TEXT_DIRECTION_INHERITED) {
|
if (tabs[p_tab].text_direction == Control::TEXT_DIRECTION_INHERITED) {
|
||||||
tabs.write[p_tab].text_buf->set_direction(is_layout_rtl() ? TextServer::DIRECTION_RTL : TextServer::DIRECTION_LTR);
|
tabs.write[p_tab].text_buf->set_direction(is_layout_rtl() ? TextServer::DIRECTION_RTL : TextServer::DIRECTION_LTR);
|
||||||
} else {
|
} else {
|
||||||
|
@ -529,7 +530,6 @@ bool Tabs::get_offset_buttons_visible() const {
|
||||||
void Tabs::set_tab_title(int p_tab, const String &p_title) {
|
void Tabs::set_tab_title(int p_tab, const String &p_title) {
|
||||||
ERR_FAIL_INDEX(p_tab, tabs.size());
|
ERR_FAIL_INDEX(p_tab, tabs.size());
|
||||||
tabs.write[p_tab].text = p_title;
|
tabs.write[p_tab].text = p_title;
|
||||||
tabs.write[p_tab].xl_text = atr(p_title);
|
|
||||||
_shape(p_tab);
|
_shape(p_tab);
|
||||||
update();
|
update();
|
||||||
minimum_size_changed();
|
minimum_size_changed();
|
||||||
|
|
Loading…
Reference in a new issue