Invalidate wxOwnerDrawnComboBox best size after adding new items

The previously computed best size may become invalid after inserting new
items, so forget it.

See #23681.

(cherry picked from commit a9d2a140900f8214f7d724889fcf9f06c27db7d2)
This commit is contained in:
Reza Karimi 2023-07-03 16:38:03 +02:00 committed by Vadim Zeitlin
parent be772c284f
commit 97f024c6b5
2 changed files with 3 additions and 0 deletions

View File

@ -263,6 +263,7 @@ All (GUI):
- Fix crash when loading some mal-formed GIFs (PB, #23409).
- Relax checks on character entry in numeric validators (#12968, #23561).
- Fix wxRibbonToolBar::GetToolByPos() and DeleteToolByPos() (mcorino, #23457).
- Update wxOwnerDrawnComboBox best size when adding items (Reza Karimi, #23681).
wxGTK:

View File

@ -1112,6 +1112,7 @@ int wxOwnerDrawnComboBox::DoInsertItems(const wxArrayStringsAdapter& items,
AssignNewItemClientData(n, clientData, i, type);
}
InvalidateBestSize();
return n;
}
else
@ -1122,6 +1123,7 @@ int wxOwnerDrawnComboBox::DoInsertItems(const wxArrayStringsAdapter& items,
AssignNewItemClientData(pos, clientData, i, type);
}
InvalidateBestSize();
return pos - 1;
}
}