Skip to content

Commit

Permalink
Join only keyboard and joy mix slots - AntiMicroX#93
Browse files Browse the repository at this point in the history
However that's debatable
  • Loading branch information
juliagoda committed Apr 8, 2020
1 parent 77c03c3 commit 09c8427
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/advancebuttondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ void AdvanceButtonDialog::joinSlot()
}
else if (anySelectedNotKeybSlot())
{
QMessageBox::warning(this, tr("Only keyboard slots"), tr("It's only possible to join simple keyboard slots"));
QMessageBox::warning(this, tr("Only keyboard slots"), tr("It's only possible to join simple and mix keyboard slots"));
}
else
{
Expand Down Expand Up @@ -1580,7 +1580,9 @@ bool AdvanceButtonDialog::anySelectedNotKeybSlot()
{
for(auto item : ui->slotListWidget->selectedItems())
{
if (item->data(Qt::UserRole).value<SimpleKeyGrabberButton*>()->getValue()->getSlotMode() != JoyButtonSlot::JoySlotInputAction::JoyKeyboard)
auto slotMode = item->data(Qt::UserRole).value<SimpleKeyGrabberButton*>()->getValue()->getSlotMode();

if ((slotMode != JoyButtonSlot::JoySlotInputAction::JoyMix) && (slotMode != JoyButtonSlot::JoySlotInputAction::JoyKeyboard))
{
return true;
}
Expand Down

0 comments on commit 09c8427

Please sign in to comment.