File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ void ListBox::AppendItem( const sf::String& str ) {
7474
7575 UpdateDisplayedItems ();
7676 RequestResize ();
77+ HandleSizeChange ();
7778 Invalidate ();
7879}
7980
@@ -97,6 +98,7 @@ void ListBox::InsertItem( IndexType index, const sf::String& str ) {
9798
9899 UpdateDisplayedItems ();
99100 RequestResize ();
101+ HandleSizeChange ();
100102 Invalidate ();
101103}
102104
@@ -117,6 +119,7 @@ void ListBox::PrependItem( const sf::String& str ) {
117119
118120 UpdateDisplayedItems ();
119121 RequestResize ();
122+ HandleSizeChange ();
120123 Invalidate ();
121124}
122125
@@ -126,6 +129,9 @@ void ListBox::ChangeItem( IndexType index, const sf::String& str ) {
126129 }
127130
128131 m_items[ static_cast <std::size_t >( index ) ] = str;
132+
133+ UpdateDisplayedItems ();
134+ Invalidate ();
129135}
130136
131137void ListBox::RemoveItem ( IndexType index ) {
@@ -155,6 +161,7 @@ void ListBox::RemoveItem( IndexType index ) {
155161
156162 UpdateDisplayedItems ();
157163 RequestResize ();
164+ HandleSizeChange ();
158165 Invalidate ();
159166}
160167
@@ -164,6 +171,7 @@ void ListBox::Clear() {
164171
165172 UpdateDisplayedItems ();
166173 RequestResize ();
174+ HandleSizeChange ();
167175 Invalidate ();
168176}
169177
@@ -433,6 +441,8 @@ void ListBox::HandleSizeChange() {
433441 UpdateScrollbarAllocation ();
434442
435443 UpdateDisplayedItemsText ();
444+
445+ Invalidate ();
436446}
437447
438448bool ListBox::HandleAdd ( Widget::Ptr widget ) {
You can’t perform that action at this time.
0 commit comments