Don't add tracks in reversed mode when it's not available.

This fixes #2158.
This commit is contained in:
Deve 2015-08-09 20:52:12 +02:00
parent 78cd8efdd4
commit fe1222c5cc

View File

@ -171,16 +171,19 @@ void EditGPScreen::init()
if (edit->getResult()) if (edit->getResult())
{ {
bool reverse = edit->getTrack()->reverseAvailable() ?
edit->getReverse() : false;
if (m_action == "add") if (m_action == "add")
{ {
m_gp->addTrack(edit->getTrack(), edit->getLaps(), edit->getReverse(), m_gp->addTrack(edit->getTrack(), edit->getLaps(), reverse,
m_selected); m_selected);
setSelected(m_selected + 1); setSelected(m_selected + 1);
} }
else if (m_action == "edit") else if (m_action == "edit")
{ {
m_gp->editTrack(m_selected, edit->getTrack(), edit->getLaps(), m_gp->editTrack(m_selected, edit->getTrack(), edit->getLaps(),
edit->getReverse()); reverse);
} }
setModified(true); setModified(true);
} }