1.0.20
This commit is contained in:
parent
97a8d8fffd
commit
af22cf9aef
|
@ -61,13 +61,28 @@ void COptionsWindow::OnDelStartProg()
|
||||||
|
|
||||||
void COptionsWindow::OnStartChanged(QTreeWidgetItem* pItem, int Index)
|
void COptionsWindow::OnStartChanged(QTreeWidgetItem* pItem, int Index)
|
||||||
{
|
{
|
||||||
if (pItem->checkState(0) == Qt::Checked) {
|
QString Name = pItem->data(0, Qt::UserRole).toString();
|
||||||
if(DelProgramFromGroup(pItem->data(0, Qt::UserRole).toString(), "<StartRunAccessDisabled>"))
|
QString NewName = pItem->text(0);
|
||||||
AddProgramToGroup(pItem->data(0, Qt::UserRole).toString(), "<StartRunAccess>");
|
if (Name != NewName)
|
||||||
|
{
|
||||||
|
pItem->setData(0, Qt::UserRole, NewName);
|
||||||
|
|
||||||
|
if (pItem->checkState(0) == Qt::Checked) {
|
||||||
|
if (DelProgramFromGroup(Name, "<StartRunAccess>"))
|
||||||
|
AddProgramToGroup(NewName, "<StartRunAccess>");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (DelProgramFromGroup(Name, "<StartRunAccessDisabled>"))
|
||||||
|
AddProgramToGroup(NewName, "<StartRunAccessDisabled>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (pItem->checkState(0) == Qt::Checked) {
|
||||||
|
if(DelProgramFromGroup(Name, "<StartRunAccessDisabled>"))
|
||||||
|
AddProgramToGroup(Name, "<StartRunAccess>");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(DelProgramFromGroup(pItem->data(0, Qt::UserRole).toString(), "<StartRunAccess>"))
|
if(DelProgramFromGroup(Name, "<StartRunAccess>"))
|
||||||
AddProgramToGroup(pItem->data(0, Qt::UserRole).toString(), "<StartRunAccessDisabled>");
|
AddProgramToGroup(Name, "<StartRunAccessDisabled>");
|
||||||
}
|
}
|
||||||
//m_StartChanged = true;
|
//m_StartChanged = true;
|
||||||
//OnOptChanged();
|
//OnOptChanged();
|
||||||
|
|
Loading…
Reference in New Issue