From f31c7972aba48d10aae076d93f17548437453a4b Mon Sep 17 00:00:00 2001 From: milek7 Date: Sat, 8 Dec 2018 13:34:04 +0100 Subject: [PATCH] et40 fix --- Train.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Train.cpp b/Train.cpp index 4b67f59f..4e5953b1 100644 --- a/Train.cpp +++ b/Train.cpp @@ -750,6 +750,11 @@ void TTrain::OnCommand_mastercontrollerincrease( TTrain *Train, command_data con if( Command.action != GLFW_RELEASE ) { // on press or hold Train->mvControlled->IncMainCtrl( 1 ); + Train->m_mastercontrollerinuse = true; + } + else if (Command.action == GLFW_RELEASE) { + // release + Train->m_mastercontrollerinuse = false; } } @@ -768,7 +773,7 @@ void TTrain::OnCommand_mastercontrollerdecrease( TTrain *Train, command_data con Train->mvControlled->DecMainCtrl( 1 ); Train->m_mastercontrollerinuse = true; } - else { + else if (Command.action == GLFW_RELEASE) { // release Train->m_mastercontrollerinuse = false; } @@ -808,11 +813,6 @@ void TTrain::OnCommand_secondcontrollerincrease( TTrain *Train, command_data con else { Train->mvControlled->IncScndCtrl( 1 ); } - Train->m_mastercontrollerinuse = true; - } - else { - // release - Train->m_mastercontrollerinuse = false; } }