Add ability to create a brush preset from scratch as well as delete/blacklist a preset
ClosedPublic

Authored by scottpetrovic on Dec 21 2017, 3:49 PM.

Details

Reviewers
woltherav
Group Reviewers
Krita
Summary

This diff is to address the issue with creating brush presets from scratch.

https://phabricator.kde.org/T7380

This adds two things

  1. a + icon by the presets section in the brush editor. Holding the button down will allow you to select the default brush engine for any given engine.
  2. Added a delete button. We do not delete presets so this will blacklist the currently selected resource and update the presets list

For creating a new preset, I also added a bit of UI state management by hiding things like rename, reload, or overwriting. The state returns to normal once another preset is selected from the preset list

Test Plan

I tested it by trying out the different brush engines and seeing the settings area update.

I also tried saving the new preset to make sure that still works. I tested out different states like renaming and adding to try and make sure the UI states update correctly.

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
scottpetrovic requested review of this revision.Dec 21 2017, 3:49 PM
scottpetrovic created this revision.

This is good, however, two tiny things:

There's a white space too much, clean it out :)

../D9465.diff:298: trailing whitespace.
            this, SIGNAL(signalResourceSelected(KoResource*)));    
warning: 1 line adds whitespace errors.

And one in the code.

libs/ui/widgets/kis_paintop_presets_popup.cpp
630

Could you also add a line here or so to have the newPresetEngineButton's pop-up mode be instant?

It'd be QToolButton::InstantPopup on http://doc.qt.io/qt-5/qtoolbutton.html#popupMode-prop

woltherav accepted this revision.Dec 21 2017, 3:58 PM
This revision is now accepted and ready to land.Dec 21 2017, 3:58 PM
scottpetrovic closed this revision.Dec 22 2017, 1:32 PM

@woltherav updated with your couple fixes and pushed out. closing this request.