From d34b434b23824ddb4c39340eda4634c4d72fa383 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 12 Mar 2016 21:59:29 +0100 Subject: [PATCH] Changed: Disable widgets if no profile selected --HG-- branch : feature-ryzom-installer --- .../tools/client/ryzom_installer/src/profilesdialog.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.cpp b/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.cpp index 5134902fc..9d0f0a4ed 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/profilesdialog.cpp @@ -79,6 +79,15 @@ void CProfilesDialog::onProfileClicked(const QModelIndex &index) void CProfilesDialog::displayProfile(int index) { + bool enabled = index > -1; + + profileIdLabel->setEnabled(enabled); + accountEdit->setEnabled(enabled); + nameEdit->setEnabled(enabled); + serverComboBox->setEnabled(enabled); + argumentsEdit->setEnabled(enabled); + commentsEdit->setEnabled(enabled); + if (index < 0) return; saveProfile(m_currentProfileIndex);