Browse Source

Keep editor SceneTree buttons attached to the cell in Right-To-Left

Update tree.cpp.
Fix #102191.

Update scene/gui/tree.cpp

Co-Authored-By: Tomasz Chabora <[email protected]>
BrotherShort 5 months ago
parent
commit
571cd4de7d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/gui/tree.cpp

+ 1 - 1
scene/gui/tree.cpp

@@ -2177,7 +2177,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
 				}
 				}
 			}
 			}
 
 
-			if (!rtl && p_item->cells[i].buttons.size()) {
+			if (!p_item->cells[i].buttons.is_empty()) {
 				int buttons_width = 0;
 				int buttons_width = 0;
 				for (int j = p_item->cells[i].buttons.size() - 1; j >= 0; j--) {
 				for (int j = p_item->cells[i].buttons.size() - 1; j >= 0; j--) {
 					Ref<Texture2D> button_texture = p_item->cells[i].buttons[j].texture;
 					Ref<Texture2D> button_texture = p_item->cells[i].buttons[j].texture;