mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-09 13:19:00 +00:00
Qt: prevent saving/canceling for remapping/hotkeys dialogs while waiting for inputs (#3499)
* prevent saving/canceling dialog while mapping mode is enabled * do not disable cancel button * diable defaults button
This commit is contained in:
@@ -756,6 +756,10 @@ void ControlSettings::DisableMappingButtons() {
|
|||||||
for (const auto& i : AxisList) {
|
for (const auto& i : AxisList) {
|
||||||
i->setEnabled(false);
|
i->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ui->buttonBox->button(QDialogButtonBox::Save)->setEnabled(false);
|
||||||
|
ui->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(false);
|
||||||
|
ui->buttonBox->button(QDialogButtonBox::RestoreDefaults)->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ControlSettings::EnableMappingButtons() {
|
void ControlSettings::EnableMappingButtons() {
|
||||||
@@ -766,6 +770,10 @@ void ControlSettings::EnableMappingButtons() {
|
|||||||
for (const auto& i : AxisList) {
|
for (const auto& i : AxisList) {
|
||||||
i->setEnabled(true);
|
i->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ui->buttonBox->button(QDialogButtonBox::Save)->setEnabled(true);
|
||||||
|
ui->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(true);
|
||||||
|
ui->buttonBox->button(QDialogButtonBox::RestoreDefaults)->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ControlSettings::ConnectAxisInputs(QPushButton*& button) {
|
void ControlSettings::ConnectAxisInputs(QPushButton*& button) {
|
||||||
|
|||||||
@@ -70,12 +70,18 @@ void hotkeys::DisableMappingButtons() {
|
|||||||
for (const auto& i : ButtonsList) {
|
for (const auto& i : ButtonsList) {
|
||||||
i->setEnabled(false);
|
i->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ui->buttonBox->button(QDialogButtonBox::Save)->setEnabled(false);
|
||||||
|
ui->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void hotkeys::EnableMappingButtons() {
|
void hotkeys::EnableMappingButtons() {
|
||||||
for (const auto& i : ButtonsList) {
|
for (const auto& i : ButtonsList) {
|
||||||
i->setEnabled(true);
|
i->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ui->buttonBox->button(QDialogButtonBox::Save)->setEnabled(true);
|
||||||
|
ui->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void hotkeys::SaveHotkeys(bool CloseOnSave) {
|
void hotkeys::SaveHotkeys(bool CloseOnSave) {
|
||||||
|
|||||||
@@ -162,12 +162,20 @@ void KBMSettings::DisableMappingButtons() {
|
|||||||
for (const auto& i : ButtonsList) {
|
for (const auto& i : ButtonsList) {
|
||||||
i->setEnabled(false);
|
i->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ui->buttonBox->button(QDialogButtonBox::Save)->setEnabled(false);
|
||||||
|
ui->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(false);
|
||||||
|
ui->buttonBox->button(QDialogButtonBox::RestoreDefaults)->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KBMSettings::EnableMappingButtons() {
|
void KBMSettings::EnableMappingButtons() {
|
||||||
for (const auto& i : ButtonsList) {
|
for (const auto& i : ButtonsList) {
|
||||||
i->setEnabled(true);
|
i->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ui->buttonBox->button(QDialogButtonBox::Save)->setEnabled(true);
|
||||||
|
ui->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(true);
|
||||||
|
ui->buttonBox->button(QDialogButtonBox::RestoreDefaults)->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KBMSettings::SaveKBMConfig(bool close_on_save) {
|
void KBMSettings::SaveKBMConfig(bool close_on_save) {
|
||||||
|
|||||||
Reference in New Issue
Block a user