mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-31 02:02:00 +08:00
Merge branch 'master_27x' of https://github.com/Prusa-Development/PrusaSlicerPrivate into master_27x
This commit is contained in:
commit
c40284a4cd
@ -308,16 +308,12 @@ void ComboBox::keyDown(wxKeyEvent& event)
|
||||
{
|
||||
int key_code = event.GetKeyCode();
|
||||
switch (key_code) {
|
||||
case WXK_RETURN:
|
||||
case WXK_RETURN: {
|
||||
if (drop_down) {
|
||||
drop.DismissAndNotify();
|
||||
|
||||
wxCommandEvent e(wxEVT_COMBOBOX);
|
||||
e.SetEventObject(this);
|
||||
e.SetId(GetId());
|
||||
e.SetInt(GetSelection());
|
||||
GetEventHandler()->ProcessEvent(e);
|
||||
} else if (drop.HasDismissLongTime()) {
|
||||
sendComboBoxEvent();
|
||||
}
|
||||
else if (drop.HasDismissLongTime()) {
|
||||
drop.autoPosition();
|
||||
drop_down = true;
|
||||
drop.Popup();
|
||||
@ -325,14 +321,19 @@ void ComboBox::keyDown(wxKeyEvent& event)
|
||||
GetEventHandler()->ProcessEvent(e);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WXK_UP: {
|
||||
if (GetSelection() > 0)
|
||||
SetSelection(GetSelection() - 1);
|
||||
if (!drop.IsShown())
|
||||
sendComboBoxEvent();
|
||||
break;
|
||||
}
|
||||
case WXK_DOWN: {
|
||||
if (GetSelection() + 1 < int(texts.size()))
|
||||
SetSelection(GetSelection() + 1);
|
||||
if (!drop.IsShown())
|
||||
sendComboBoxEvent();
|
||||
break;
|
||||
}
|
||||
case WXK_LEFT: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user