Bug 376673

Summary: Button to add custom template image not working
Product: [Applications] krita Reporter: animtim
Component: UsabilityAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: halla
Priority: NOR    
Version First Reported In: 3.1.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description animtim 2017-02-19 15:18:48 UTC
In the window with the menu to manage templates (File->Create Template from image), if you select "Custom" for the picture and click the button "Select", it does nothing. 

Workaround is to manually set it on the template files, but that's not very user friendly.
Comment 1 Halla Rempt 2017-11-21 13:11:51 UTC
Right...

void KisTemplateCreateDia::slotSelect() {

    d->m_default->setChecked(false);
    d->m_custom->setChecked(true);

    // QT5TODO
//    QString name = KIconDialog::getIcon();
//    if( name.isEmpty() ) {
//        if(d->m_customFile.isEmpty()) {
//            d->m_default->setChecked(true);
//            d->m_custom->setChecked(false);
//        }
//        return;
//    }

//    const QString path = KIconLoader::global()->iconPath(name, -thumbnailExtent);
    d->m_customFile = QString();// path;
    d->m_customPixmap = QPixmap();
    updatePixmap();
}
Comment 2 Halla Rempt 2017-11-21 13:27:10 UTC
Fixed in 

commit 79516146ce7e8ede93bd147a1df194e82248e652
Author: Boudewijn Rempt <boud@valdyas.org>
Date:   Tue Nov 21 14:19:48 2017 +0100

    Port KisTemplateCreateDia to Qt5
    
    The functionality isn't exactly the same, but probably even more
    useful.