This commit is contained in:
DavidXanatos 2021-10-19 23:35:59 +02:00
parent 0a6f5c79f7
commit f5c5cc5229
2 changed files with 6 additions and 3 deletions

View File

@ -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)) {
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;
}

View File

@ -138,7 +138,8 @@ COptionsWindow::COptionsWindow(const QSharedPointer<CSbieIni>& 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()));