Require less clicks to change filament in object list (#12603)

* reduces number of clicks to change filament in objectlist

* dont set minimum width in dropdown if use_content_width == true

---------

Co-authored-by: Hanno Witzleb <hannowitzleb@gmail.com>
Co-authored-by: yw4z <ywsyildiz@gmail.com>
This commit is contained in:
Hanno Witzleb
2026-04-24 08:48:59 +02:00
committed by GitHub
parent 0082b60852
commit 8bff921ade
6 changed files with 43 additions and 21 deletions

View File

@@ -241,6 +241,23 @@ void ComboBox::DoDeleteOneItem(unsigned int pos)
drop.Invalidate(true);
}
void ComboBox::ForceDropdownOpen()
{
if (!IsEnabled())
return;
if (!drop_down) {
drop.need_sync = true;
drop.messureSize();
drop.autoPosition();
drop_down = true;
drop.Popup(&drop);
wxCommandEvent e(wxEVT_COMBOBOX_DROPDOWN);
GetEventHandler()->ProcessEvent(e);
}
}
unsigned int ComboBox::GetCount() const { return items.size(); }
void ComboBox::set_replace_text(wxString text, wxString image_name)