Commit 56d7727d authored by Nate Graham's avatar Nate Graham 🔩
Browse files

Don't disable table view when "Enable guests" checkbox is checked

This didn't make sense as the two are not connected.
parent b3ddda38
......@@ -143,10 +143,7 @@ SambaUserSharePlugin::SambaUserSharePlugin(QObject *parent, const QList<QVariant
connect(propertiesUi.sambaNameEdit, &QLineEdit::textChanged,
this, &SambaUserSharePlugin::checkShareName);
connect(propertiesUi.sambaAllowGuestChk, &QCheckBox::toggled,
this, [=] (bool checked) {
propertiesUi.tableView->setEnabled(checked && propertiesUi.sambaChk->isChecked());
setDirty();
});
this, [=] (bool checked) { setDirty(); });
connect(model, &UserPermissionModel::dataChanged,
this, [=] { setDirty(); });
connect(propertiesUi.sambaStatusMonitorButton, &QPushButton::clicked,
......@@ -245,8 +242,7 @@ void SambaUserSharePlugin::load()
guestAllowed = (bool) shareData.guestPermission();
}
propertiesUi.sambaAllowGuestChk->setChecked(guestAllowed);
propertiesUi.tableView->setEnabled(propertiesUi.sambaChk->isChecked() &&
propertiesUi.sambaAllowGuestChk->isChecked());
propertiesUi.tableView->setEnabled(propertiesUi.sambaChk->isChecked());
propertiesUi.sambaNameEdit->setText(shareData.name());
}
......@@ -282,7 +278,7 @@ void SambaUserSharePlugin::toggleShareStatus(bool checked)
propertiesUi.textLabel1->setEnabled(checked);
propertiesUi.sambaNameEdit->setEnabled(checked);
propertiesUi.sambaAllowGuestChk->setEnabled(checked);
propertiesUi.tableView->setEnabled(checked && propertiesUi.sambaAllowGuestChk->isChecked());
propertiesUi.tableView->setEnabled(checked);
if (checked && propertiesUi.sambaNameEdit->text().isEmpty()) {
propertiesUi.sambaNameEdit->setText(getNewShareName());
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment