mirror of
https://github.com/tnodir/fort
synced 2024-11-15 11:25:08 +00:00
UI: ConfManager: Simplify applySavedConf().
This commit is contained in:
parent
64d9be13f8
commit
25fa931443
@ -513,14 +513,10 @@ bool ConfManager::saveConf(FirewallConf &conf)
|
||||
|
||||
void ConfManager::applySavedConf(FirewallConf *newConf)
|
||||
{
|
||||
const bool onlyFlags = !newConf->optEdited();
|
||||
|
||||
if (onlyFlags && !newConf->anyEdited()) {
|
||||
if (newConf != conf()) {
|
||||
newConf->deleteLater(); // RPC leftover
|
||||
}
|
||||
if (!newConf->anyEdited())
|
||||
return;
|
||||
}
|
||||
|
||||
const bool onlyFlags = !newConf->optEdited();
|
||||
|
||||
if (conf() != newConf) {
|
||||
if (onlyFlags) {
|
||||
|
@ -63,5 +63,9 @@ bool ConfManagerRpc::saveConf(FirewallConf &newConf)
|
||||
// Already applied by onConfChanged() & applySavedConf()
|
||||
newConf.resetEdited();
|
||||
|
||||
if (&newConf != conf()) {
|
||||
newConf.deleteLater();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user