Filament ComboBox editor updates

-Add show drop down feature to ObjectTable
-Call finish editing when ComboBox is closed in ObjectList
This commit is contained in:
Ocraftyone 2023-11-27 07:02:43 -05:00
parent d13bbb1890
commit 07a637d35a
No known key found for this signature in database
GPG key ID: 85836ED21AD4D125
2 changed files with 9 additions and 1 deletions

View file

@ -5486,9 +5486,11 @@ void ObjectList::ItemValueChanged(wxDataViewEvent &event)
// Here the last active column is forgotten, so when leaving the editing mode, the next mouse click will not enter the editing mode of the newly selected column.
void ObjectList::OnEditingStarted(wxDataViewEvent &event)
{
// Orca: Automatically show drop down on editing start and finish editing when the combobox is closed
if (event.GetColumn() == colFilament) {
::ComboBox*c = static_cast<::ComboBox *>(event.GetDataViewColumn()->GetRenderer()->GetEditorCtrl());
c->ToggleDropDown();
c->Bind(wxEVT_COMBOBOX_CLOSEUP, [event](wxCommandEvent& evt){ event.GetDataViewColumn()->GetRenderer()->FinishEditing(); });
}
#ifdef __WXMSW__
m_last_selected_column = -1;