mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-23 15:46:18 +00:00
Changed: Disable widgets if no profile selected
This commit is contained in:
parent
1f999fc420
commit
63dddb4df8
1 changed files with 9 additions and 0 deletions
|
@ -79,6 +79,15 @@ void CProfilesDialog::onProfileClicked(const QModelIndex &index)
|
||||||
|
|
||||||
void CProfilesDialog::displayProfile(int 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;
|
if (index < 0) return;
|
||||||
|
|
||||||
saveProfile(m_currentProfileIndex);
|
saveProfile(m_currentProfileIndex);
|
||||||
|
|
Loading…
Reference in a new issue