mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-28 15:18:21 +00:00
NOISSUE Fix shortcut dialog bugs
Fixes bugs in the create shortcut dialog where the OK button and server address text box were always disabled on instances that don't support Quick Play.
This commit is contained in:
parent
bd95c3ea33
commit
44a4712e61
@ -111,9 +111,11 @@ void CreateShortcutDialog::updateDialogState()
|
||||
{
|
||||
ui->buttonBox->button(QDialogButtonBox::StandardButton::Ok)->setEnabled(
|
||||
!ui->shortcutPath->text().isEmpty()
|
||||
&& (!ui->joinWorldCheckBox->isChecked() || ui->joinServerRadioButton->isChecked() || ui->joinSingleplayerRadioButton->isChecked())
|
||||
&& (!ui->joinServerRadioButton->isChecked() || !ui->joinServer->text().isEmpty())
|
||||
&& (!ui->joinSingleplayerRadioButton->isChecked() || !ui->joinSingleplayer->currentText().isEmpty())
|
||||
&& (
|
||||
!ui->joinWorldCheckBox->isChecked()
|
||||
|| (ui->joinServerRadioButton->isChecked() && !ui->joinServer->text().isEmpty())
|
||||
|| (ui->joinSingleplayerRadioButton->isChecked() && !ui->joinSingleplayer->currentText().isEmpty())
|
||||
)
|
||||
&& (!ui->offlineUsernameCheckBox->isChecked() || !ui->offlineUsername->text().isEmpty())
|
||||
&& (!ui->useProfileCheckBox->isChecked() || !ui->profileComboBox->currentText().isEmpty())
|
||||
);
|
||||
|
@ -1,9 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright 2022-2023 arthomnix
|
||||
This source is subject to the Microsoft Public License (MS-PL).
|
||||
Please see the COPYING.md file for more information.
|
||||
-->
|
||||
<ui version="4.0">
|
||||
<class>CreateShortcutDialog</class>
|
||||
<widget class="QDialog" name="CreateShortcutDialog">
|
||||
@ -454,6 +449,22 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>joinWorldCheckBox</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>CreateShortcutDialog</receiver>
|
||||
<slot>updateDialogState()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>140</x>
|
||||
<y>59</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>397</x>
|
||||
<y>164</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>updateDialogState()</slot>
|
||||
|
Loading…
Reference in New Issue
Block a user