Skip to content

Commit

Permalink
fix: Set change sometimes returns to wrong set
Browse files Browse the repository at this point in the history
Linked issue with diagnosis: #1050
  • Loading branch information
pktiuk committed Oct 20, 2024
1 parent dea521e commit 4a6af18
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gui/joytabwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,12 @@ void JoyTabWidget::changeCurrentSet(int index)
oldSetButton->style()->polish(oldSetButton);
}

m_joystick->setActiveSetNumber(index);
// Call only in reaction to a GUI button click to avoid race condition
if (QObject::sender()->metaObject()->className() == "QPushButton")
{
m_joystick->setActiveSetNumber(index);
}

stackedWidget_2->setCurrentIndex(index);

switch (index)
Expand Down

0 comments on commit 4a6af18

Please sign in to comment.