소스 검색

Call minimum_size_changed() in PopupMenu::remove_item()

When removing an item from a PopupMenu we need to update the control's
size cache otherwise the size of the PopupMenu itself lags behind by 1
item size. Meaning the PopupMenu will remain too large.
Hein-Pieter van Braam 7 년 전
부모
커밋
2d032c1562
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      scene/gui/popup_menu.cpp

+ 1 - 0
scene/gui/popup_menu.cpp

@@ -1099,6 +1099,7 @@ void PopupMenu::remove_item(int p_idx) {
 
 	items.remove(p_idx);
 	update();
+	minimum_size_changed();
 }
 
 void PopupMenu::add_separator(const String &p_text) {