Commit ac0a38a3 authored by Alexander Semke's avatar Alexander Semke
Browse files

Don't create a new worksheet via the double click in the "Select the backend"...

Don't create a new worksheet via the double click in the "Select the backend" dialog if the backend is not enabled.
parent c79dd271
......@@ -29,7 +29,10 @@ BackendChooseDialog::BackendChooseDialog(QWidget* parent) : QDialog(parent)
m_ui.backendList->setIconSize(QSize(KIconLoader::SizeMedium, KIconLoader::SizeMedium));
m_ui.backendList->setSortingEnabled(true);
connect(m_ui.backendList, &QListWidget::currentItemChanged, this, &BackendChooseDialog::updateContent);
connect(m_ui.backendList, &QListWidget::itemDoubleClicked, this, &BackendChooseDialog::accept);
connect(m_ui.backendList, &QListWidget::itemDoubleClicked, this, [=]() {
if (m_ui.buttonBox->button(QDialogButtonBox::Ok)->isEnabled())
accept();
});
m_ui.buttonBox->button(QDialogButtonBox::Ok);
m_ui.buttonBox->button(QDialogButtonBox::Ok)->setIcon(QApplication::style()->standardIcon(QStyle::SP_DialogOkButton));
......
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