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

@@ -460,6 +460,15 @@ void ObjectList::create_objects_ctrl()
AppendBitmapColumn(" ", colEditing, wxOSX ? wxDATAVIEW_CELL_EDITABLE : wxDATAVIEW_CELL_INERT, m_columns_width[colEditing] * em,
wxALIGN_CENTER_HORIZONTAL, 0);
// Open filament editor faster
this->Bind(wxEVT_DATAVIEW_ITEM_ACTIVATED, [this](wxDataViewEvent& event) {
if (event.GetColumn() == colFilament) {
// Trigger the editor opening manually
this->EditItem(event.GetItem(), GetColumn(colFilament));
}
});
//for (int cn = colName; cn < colCount; cn++) {
// GetColumn(cn)->SetResizeable(cn == colName);
//}