FIX: filament list group problem

Change-Id: I0ab9590e88336a8f95285df5f346f45eebe8d32a
Jira: STUDIO-12522, STUDIO-12209
(cherry picked from commit efeb19a292a38e2f8a4d117b5bfceddd644e4ce0)
This commit is contained in:
chunmao.guo
2025-07-04 18:38:11 +08:00
committed by Noisyfox
parent 270ebc2688
commit 639ae50afb
2 changed files with 18 additions and 18 deletions

View File

@@ -389,7 +389,7 @@ void DropDown::render(wxDC &dc)
}
auto text = group.IsEmpty()
? (item.group.IsEmpty() ? item.text : item.group)
: (item.text.StartsWith(group) ? item.text.substr(group.size()).Trim(false) : item.text);
: (item.text.StartsWith(group) && !group.EndsWith(' ') ? item.text.substr(group.size()).Trim(false) : item.text);
if (!text_off && !text.IsEmpty()) {
wxSize tSize = dc.GetMultiLineTextExtent(text);
if (pt.x + tSize.x > rcContent.GetRight()) {
@@ -501,7 +501,7 @@ void DropDown::messureSize()
if (!text_off) {
auto text = group.IsEmpty()
? (item.group.IsEmpty() ? item.text : item.group)
: (item.text.StartsWith(group) ? item.text.substr(group.size()).Trim(false) : item.text);
: (item.text.StartsWith(group) && !group.EndsWith(' ') ? item.text.substr(group.size()).Trim(false) : item.text);
size1 = dc.GetMultiLineTextExtent(text);
if (group.IsEmpty() && !item.group.IsEmpty())
size1.x += 5 + arrow_bitmap.GetBmpWidth();