From fe1222c5cce5b743ce57262bad8a8382b9c77a14 Mon Sep 17 00:00:00 2001 From: Deve Date: Sun, 9 Aug 2015 20:52:12 +0200 Subject: [PATCH] Don't add tracks in reversed mode when it's not available. This fixes #2158. --- src/states_screens/edit_gp_screen.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/states_screens/edit_gp_screen.cpp b/src/states_screens/edit_gp_screen.cpp index 8cd5e00f1..1bdffae1c 100644 --- a/src/states_screens/edit_gp_screen.cpp +++ b/src/states_screens/edit_gp_screen.cpp @@ -171,16 +171,19 @@ void EditGPScreen::init() if (edit->getResult()) { + bool reverse = edit->getTrack()->reverseAvailable() ? + edit->getReverse() : false; + if (m_action == "add") { - m_gp->addTrack(edit->getTrack(), edit->getLaps(), edit->getReverse(), - m_selected); + m_gp->addTrack(edit->getTrack(), edit->getLaps(), reverse, + m_selected); setSelected(m_selected + 1); } else if (m_action == "edit") { m_gp->editTrack(m_selected, edit->getTrack(), edit->getLaps(), - edit->getReverse()); + reverse); } setModified(true); }