Skip to content

Commit

Permalink
Detected unwanted situations - III part AntiMicroX#93
Browse files Browse the repository at this point in the history
Joining many mix slots without complications
  • Loading branch information
juliagoda committed Mar 25, 2020
1 parent da19b14 commit 1f98378
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
14 changes: 8 additions & 6 deletions src/joybutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1765,11 +1765,11 @@ QString JoyButton::buildActiveZoneSummary(QList<JoyButtonSlot *> &tempList)

qDebug() << "Create summary for JoyMix. Progress: " << stringListMix;

if ((j > 2) && iterM->hasNext())
{
stringListMix.append("...");
iterM->toBack();
}
// if ((j > 2) && iterM->hasNext())
// {
// stringListMix.append("...");
// iterM->toBack();
// }
}

j = 0;
Expand All @@ -1784,7 +1784,9 @@ QString JoyButton::buildActiveZoneSummary(QList<JoyButtonSlot *> &tempList)
res += strListEl;
}


stringlist.append(res);
stringListMix.clear();

behindHold = false;

Expand Down Expand Up @@ -2028,7 +2030,7 @@ QString JoyButton::getSlotsString()
while (iter.hasNext())
{
JoyButtonSlot *slot = iter.next();
stringlist.append(slot->getSlotString());
stringlist.append(slot->getSlotString()); // tu
}

label = stringlist.join(", ");
Expand Down
12 changes: 9 additions & 3 deletions src/xml/joybuttonslotxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,23 @@ void JoyButtonSlotXml::readConfig(QXmlStreamReader *xml)
if (xml->name() == "mode" && xml->readElementText() == "mix")
{
qDebug() << "slot text data for joy mix is: " << slotMixString;

m_joyBtnSlot->setSlotMode(JoyButtonSlot::JoyMix);
m_joyBtnSlot->setTextData(slotMixString);
m_joyBtnSlot->setSlotCode(-1);

profile = QString();
tempStringData = QString();
extraStringData = QString();
slotMixString = QString();
firstTimePlus = true;

xml->readNextStartElement();
}
}
else
{
profile = QString();
tempStringData = QString();
extraStringData = QString();

readEachSlot(xml, m_joyBtnSlot, profile, tempStringData, extraStringData);

qDebug() << "Detected simple slot: " << m_joyBtnSlot->getSlotString();
Expand Down

0 comments on commit 1f98378

Please sign in to comment.