Palette Docker: bug 402072; color selection in the combobox
ClosedPublic

Authored by amedonosova on Dec 22 2018, 6:47 AM.

Details

Summary

This diff fixes two issues:

1, bug 402072, where the user is unable to reselect a previously
selected color from the palette after picking another color by other
means.

This is fixed by clearing currentIndex in KisPaletteView upon FG color
change in the resource provider. That way the swatch stays selected, so
the user knows which color they had selected before, but enables them to
reselect the color.

2, Another issue, probably originating from commit 69915f533a6: if the
user selects a color in the KisPaletteComboBox, nothing happens.

KisPaletteComboBox calls KisPaletteView::selectClosestColor() to select
the clicked color in the palette. However, from said commit, the
function is called only with specific setting on. I have added another
slot specifically for KisPaletteComboBox, which unconditionally calls
said function.

BUG: 402072

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
amedonosova created this revision.Dec 22 2018, 6:47 AM
Restricted Application added a reviewer: Krita. · View Herald TranscriptDec 22 2018, 6:47 AM
Restricted Application added a project: Krita. · View Herald Transcript
amedonosova requested review of this revision.Dec 22 2018, 6:47 AM
woltherav accepted this revision.Dec 22 2018, 10:17 AM
woltherav added a subscriber: woltherav.

Looks good codewise!

This revision is now accepted and ready to land.Dec 22 2018, 10:17 AM
This revision was automatically updated to reflect the committed changes.