Update NewBoxWizard.cpp

fix SharedTemplate
This commit is contained in:
offhub 2024-05-28 15:16:13 +03:00
parent 655df94163
commit c1fb8e9c57
No known key found for this signature in database
GPG Key ID: 7B12A8941851DA59
1 changed files with 2 additions and 2 deletions

View File

@ -116,13 +116,13 @@ SB_STATUS CNewBoxWizard::TryToCreateBox()
bool removeDefaultTemplates = templateSettings.contains(QRegularExpression(QStringLiteral("[\r\n]#RemoveDefaultTemplates=y[\r\n]"))); bool removeDefaultTemplates = templateSettings.contains(QRegularExpression(QStringLiteral("[\r\n]#RemoveDefaultTemplates=y[\r\n]")));
// Create base template // Create base template
if (templateSettings.isEmpty()) { int sharedTemplateMode = field("sharedTemplate").toInt();
if (templateSettings.isEmpty() && sharedTemplateMode != 0) {
const QString templateBase = QStringLiteral("Tmpl.Title=%1\nTmpl.Class=Local\n%3=n\n%4=n\n%5=n\n%6=n\nTmpl.Comment=%2") const QString templateBase = QStringLiteral("Tmpl.Title=%1\nTmpl.Class=Local\n%3=n\n%4=n\n%5=n\n%6=n\nTmpl.Comment=%2")
.arg(templateTitle, templateComment, "#DisableWizardSettings", "#RemoveDefaultAll", "#RemoveDefaultRecovers", "#RemoveDefaultTemplates"); .arg(templateTitle, templateComment, "#DisableWizardSettings", "#RemoveDefaultAll", "#RemoveDefaultRecovers", "#RemoveDefaultTemplates");
theAPI->SbieIniSet(templateFullName, "", templateBase); theAPI->SbieIniSet(templateFullName, "", templateBase);
} }
int sharedTemplateMode = field("sharedTemplate").toInt();
switch (sharedTemplateMode) switch (sharedTemplateMode)
{ {
case 1: case 1: