Skip to content

Commit

Permalink
fix: Clearing button does not change label
Browse files Browse the repository at this point in the history
  • Loading branch information
pktiuk committed Aug 15, 2022
1 parent 3b49e06 commit 783546d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/joybutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1920,10 +1920,12 @@ QList<JoyButtonSlot *> JoyButton::getActiveZoneList()

if (numActiveSlots > 0)
{
qInfo() << "active";
tempLock = &activeZoneLock;
iter = &activeSlotsIter;
} else
{
qInfo() << "assig";
tempLock = &assignmentsLock;
iter = &assignmentsIter;
}
Expand Down Expand Up @@ -3067,13 +3069,14 @@ void JoyButton::removeAssignedSlot(int index)

void JoyButton::clearSlotsEventReset(bool clearSignalEmit)
{
QWriteLocker tempAssignLocker(&assignmentsLock);

assignmentsLock.lockForWrite();
resetSlotsProp();
stopTimers(false);
releaseActiveSlots();
clearAssignedSlots(clearSignalEmit);
clearQueues();
assignmentsLock.unlock();
buildActiveZoneSummaryString();
DEBUG() << "all current slots and previous slots ale cleared";
}

Expand Down

0 comments on commit 783546d

Please sign in to comment.