Fixed DoubleSlider manipulation from Preview scene

This commit is contained in:
YuSanka 2019-06-18 11:40:26 +02:00
parent 90beadb65f
commit 917702f252
7 changed files with 38 additions and 12 deletions

View file

@ -2366,9 +2366,9 @@ void DoubleSlider::OnWheel(wxMouseEvent& event)
void DoubleSlider::OnKeyDown(wxKeyEvent &event)
{
const int key = event.GetKeyCode();
if (key == '+' || key == WXK_NUMPAD_ADD)
if (key == WXK_NUMPAD_ADD)
action_tick(taAdd);
else if (key == '-' || key == 390 || key == WXK_DELETE || key == WXK_BACK)
else if (key == 390 || key == WXK_DELETE || key == WXK_BACK)
action_tick(taDel);
else if (is_horizontal())
{
@ -2398,6 +2398,15 @@ void DoubleSlider::OnKeyUp(wxKeyEvent &event)
event.Skip();
}
void DoubleSlider::OnChar(wxKeyEvent& event)
{
const int key = event.GetKeyCode();
if (key == '+')
action_tick(taAdd);
else if (key == '-')
action_tick(taDel);
}
void DoubleSlider::OnRightDown(wxMouseEvent& event)
{
this->CaptureMouse();