Bug 399796

Summary: "Last saved" template highlighted instead of the "last used" (user templates only)
Product: [Applications] krita Reporter: mvowada <freebox64>
Component: GeneralAssignee: Tiar <tamtamy.tymona>
Severity: normal CC: halla, tamtamy.tymona
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Appimage   
OS: Linux   
Latest Commit: Version Fixed In:

Description mvowada 2018-10-14 14:32:17 UTC
(Krita 4.2.0-pre-alpha (git e35700e) - Ubuntu 14.04.5 LTS)

Reproducible with user templates:

    1. Create 2 templates
    2. "CTRL + N" > choose the first template
    3. "CTRL + N"

Actual Results: the "last saved" (second template) is highlighted
Expected Results: highlight the "last used" template instead (first).
Comment 1 wolthera 2019-02-17 14:59:52 UTC
Git commit c027f26d134dbc1aa3c3026f56d509a27acfbecc by Wolthera van Hövell tot Westerflier, on behalf of Agata Cacko.
Committed on 17/02/2019 at 14:58.
Pushed by woltherav into branch 'master'.

When new custom template is created, Always Use Template and Full Template Path
are both set to the new template. When a template is being used, only
Full Template Path is set to the last used template. When highlighting
the template as default to use in New File window, Krita first uses
Always Use Template, then Full Template Path, then just first template
in the alphabetical order. To make sure the last used template is always the one
that Krita highlights, Always Use Template needs not to be considered.
This commit removes the mention of Always Use Template
in the New File window's code.

Differential Revision: https://phabricator.kde.org/D18812

M  +10   -15   libs/ui/KisTemplatesPane.cpp

Comment 2 mvowada 2019-02-18 10:32:04 UTC
Thanks wolthera