fix no autoloading journal for "filename.xopp" and "filename.xoj" problem (#3217)
* fix an autoloading journal problem By default, if suppose we were to save a file "filename.pdf" as an xopp/xoj file, it would save to "filename.xopp". But enabling Autloading journals feature in Edit->Preferences->Load/Save doesn't detect "filename.xopp" or "filename.xoj", while loading the pdf file and doesn't load the xopp/xoj file. But it instead autoloads if the file were named as "filename.pdf.xopp" or "filename.pdf.xoj". This is because Util::ClearExtensions doesn't explicitly remove ".pdf" extension from the file path, but rather removes ".xoj" and ".xopp". Utils::ClearExtensions can be forced to remove ".pdf" extension by passing the extension as the second argument to the function. This commit implements that second argument and loads "filename.xoj"/"filename.xopp" if autoloading is enabled. * remove duplicated code with a loop * resolve merge conflict * apply clang format * apply suggested changesupstream-master
parent
1a60605e7c
commit
923689147b
1 changed files with 8 additions and 10 deletions
Loading…
Reference in new issue