Skip to content

Commit

Permalink
RMG: fix speedAction signal handler in MainWindow.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed May 1, 2024
1 parent 4107ee5 commit 4c00010
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Source/RMG/UserInterface/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -973,8 +973,12 @@ void MainWindow::configureActions(void)
{
if (checked)
{
int factor = speedAction->text().split("%").first().toInt();
this->on_Action_System_SpeedFactor(factor);
QString factorText = speedAction->text().split("%").first();
// sometimes the text can contain a '&'
// which will make the toInt() function return 0
// so strip it out
factorText.remove('&');
this->on_Action_System_SpeedFactor(factorText.toInt());
}
});
}
Expand Down

0 comments on commit 4c00010

Please sign in to comment.