diff --git a/SandboxiePlus/SandMan/Windows/OptionsTemplates.cpp b/SandboxiePlus/SandMan/Windows/OptionsTemplates.cpp index 6953601b..75561d83 100644 --- a/SandboxiePlus/SandMan/Windows/OptionsTemplates.cpp +++ b/SandboxiePlus/SandMan/Windows/OptionsTemplates.cpp @@ -143,8 +143,10 @@ void COptionsWindow::OnTemplateClicked(QTreeWidgetItem* pItem, int Column) { QString Name = pItem->data(1, Qt::UserRole).toString().mid(9); if (m_GlobalTemplates.contains(Name)) { - QMessageBox::warning(this, "SandboxiePlus", tr("This template is enabled globally. To configure it, use the global options.")); - pItem->setCheckState(1, Qt::PartiallyChecked); + if (pItem->checkState(1) != Qt::PartiallyChecked) { + QMessageBox::warning(this, "SandboxiePlus", tr("This template is enabled globally. To configure it, use the global options.")); + pItem->setCheckState(1, Qt::PartiallyChecked); + } return; } diff --git a/SandboxiePlus/SandMan/Windows/OptionsWindow.cpp b/SandboxiePlus/SandMan/Windows/OptionsWindow.cpp index 320c43df..398a298a 100644 --- a/SandboxiePlus/SandMan/Windows/OptionsWindow.cpp +++ b/SandboxiePlus/SandMan/Windows/OptionsWindow.cpp @@ -138,7 +138,8 @@ COptionsWindow::COptionsWindow(const QSharedPointer& pBox, const QStri // Templates connect(ui.cmbCategories, SIGNAL(currentIndexChanged(int)), this, SLOT(OnFilterTemplates())); connect(ui.txtTemplates, SIGNAL(textChanged(const QString&)), this, SLOT(OnFilterTemplates())); - connect(ui.treeTemplates, SIGNAL(itemClicked(QTreeWidgetItem*, int)), this, SLOT(OnTemplateClicked(QTreeWidgetItem*, int))); + //connect(ui.treeTemplates, SIGNAL(itemClicked(QTreeWidgetItem*, int)), this, SLOT(OnTemplateClicked(QTreeWidgetItem*, int))); + connect(ui.treeTemplates, SIGNAL(itemChanged(QTreeWidgetItem*, int)), this, SLOT(OnTemplateClicked(QTreeWidgetItem*, int))); connect(ui.treeTemplates, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), this, SLOT(OnTemplateDoubleClicked(QTreeWidgetItem*, int))); connect(ui.btnAddTemplate, SIGNAL(clicked(bool)), this, SLOT(OnAddTemplates())); connect(ui.btnDelTemplate, SIGNAL(clicked(bool)), this, SLOT(OnDelTemplates()));