Bug 376673 - Button to add custom template image not working
Summary: Button to add custom template image not working
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (show other bugs)
Version: 3.1.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-19 15:18 UTC by animtim
Modified: 2017-11-21 13:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.