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();
|
int key_code = event.GetKeyCode();
|
||||||
switch (key_code) {
|
switch (key_code) {
|
||||||
case WXK_RETURN:
|
case WXK_RETURN: {
|
||||||
if (drop_down) {
|
if (drop_down) {
|
||||||
drop.DismissAndNotify();
|
drop.DismissAndNotify();
|
||||||
|
sendComboBoxEvent();
|
||||||
wxCommandEvent e(wxEVT_COMBOBOX);
|
}
|
||||||
e.SetEventObject(this);
|
else if (drop.HasDismissLongTime()) {
|
||||||
e.SetId(GetId());
|
|
||||||
e.SetInt(GetSelection());
|
|
||||||
GetEventHandler()->ProcessEvent(e);
|
|
||||||
} else if (drop.HasDismissLongTime()) {
|
|
||||||
drop.autoPosition();
|
drop.autoPosition();
|
||||||
drop_down = true;
|
drop_down = true;
|
||||||
drop.Popup();
|
drop.Popup();
|
||||||
@ -325,14 +321,19 @@ void ComboBox::keyDown(wxKeyEvent& event)
|
|||||||
GetEventHandler()->ProcessEvent(e);
|
GetEventHandler()->ProcessEvent(e);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case WXK_UP: {
|
case WXK_UP: {
|
||||||
if (GetSelection() > 0)
|
if (GetSelection() > 0)
|
||||||
SetSelection(GetSelection() - 1);
|
SetSelection(GetSelection() - 1);
|
||||||
|
if (!drop.IsShown())
|
||||||
|
sendComboBoxEvent();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case WXK_DOWN: {
|
case WXK_DOWN: {
|
||||||
if (GetSelection() + 1 < int(texts.size()))
|
if (GetSelection() + 1 < int(texts.size()))
|
||||||
SetSelection(GetSelection() + 1);
|
SetSelection(GetSelection() + 1);
|
||||||
|
if (!drop.IsShown())
|
||||||
|
sendComboBoxEvent();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case WXK_LEFT: {
|
case WXK_LEFT: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user