Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for not refreshing labels after changing to NONE #513

Merged
merged 1 commit into from
Aug 15, 2022

Conversation

pktiuk
Copy link
Member

@pktiuk pktiuk commented Aug 15, 2022

Closes: #436

@pktiuk
Copy link
Member Author

pktiuk commented Aug 15, 2022

Adding additional call of method JoyButton::buildActiveZoneSummaryString after clearSlotsEventReset fixes issue, but it is very not elegant solution.

void JoyButtonContextMenu::clearButton()
{
    QMetaObject::invokeMethod(button, "clearSlotsEventReset");
    QMetaObject::invokeMethod(button, "buildActiveZoneSummaryString");
}

It would be much better to just add calling buildActiveZoneSummaryString inside clearSlotsEventReset, but it causes app to freeze. (Blocking on mutex)

image

    if (numActiveSlots > 0)
    {
        tempLock = &activeZoneLock;
        iter = &activeSlotsIter;
    } else
    {
        tempLock = &assignmentsLock; //This one
        iter = &assignmentsIter;
    }

    QReadLocker tempLocker(tempLock);

@pktiuk pktiuk marked this pull request as draft August 15, 2022 16:19
@pktiuk pktiuk marked this pull request as ready for review August 15, 2022 17:22
@pktiuk pktiuk merged commit 98e4df0 into AntiMicroX:master Aug 15, 2022
@pktiuk pktiuk deleted the fix_clearing_labels branch August 17, 2022 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Selection "None" Preset does not change button labels
1 participant