Commit 3e3f0d0a authored by Anna Medonosova's avatar Anna Medonosova
Browse files

BUG:402342 Fix opening templates from command line (--template)

parent b1c8ba60
......@@ -757,6 +757,9 @@ bool KisApplication::createNewDocFromTemplate(const QString &fileName, KisMainWi
QString templateName = templateInfo.readUrl();
QUrl templateURL;
templateURL.setPath(templateBase.adjusted(QUrl::RemoveFilename|QUrl::StripTrailingSlash).path() + '/' + templateName);
if (templateURL.scheme().isEmpty()) {
templateURL.setScheme("file");
}
KisMainWindow::OpenFlags batchFlags = d->batchRun ? KisMainWindow::BatchMode : KisMainWindow::None;
if (mainWindow->openDocument(templateURL, KisMainWindow::Import | batchFlags)) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment