Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/tool/strokes/kis_color_picker_stroke_strategy.cpp
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | |||||
51 | { | 51 | { | ||
52 | if (m_d->shouldSkipWork) return; | 52 | if (m_d->shouldSkipWork) return; | ||
53 | 53 | | |||
54 | Data *d = dynamic_cast<Data*>(data); | 54 | Data *d = dynamic_cast<Data*>(data); | ||
55 | KIS_ASSERT_RECOVER_RETURN(d); | 55 | KIS_ASSERT_RECOVER_RETURN(d); | ||
56 | 56 | | |||
57 | KoColor color; | 57 | KoColor color; | ||
58 | KoColor previous = d->currentColor; | 58 | KoColor previous = d->currentColor; | ||
59 | bool result = KisToolUtils::pick(d->dev, d->pt, &color, &previous, m_d->radius, m_d->blend); | 59 | bool result = KisToolUtils::pickColor(color, d->dev, d->pt, &previous, m_d->radius, m_d->blend); | ||
60 | Q_UNUSED(result); | 60 | Q_UNUSED(result); | ||
61 | 61 | | |||
62 | emit sigColorUpdated(color); | 62 | emit sigColorUpdated(color); | ||
63 | } | 63 | } | ||
64 | 64 | | |||
65 | KisStrokeStrategy* KisColorPickerStrokeStrategy::createLodClone(int levelOfDetail) | 65 | KisStrokeStrategy* KisColorPickerStrokeStrategy::createLodClone(int levelOfDetail) | ||
66 | { | 66 | { | ||
67 | m_d->shouldSkipWork = true; | 67 | m_d->shouldSkipWork = true; | ||
68 | 68 | | |||
69 | KisColorPickerStrokeStrategy *lodStrategy = new KisColorPickerStrokeStrategy(levelOfDetail); | 69 | KisColorPickerStrokeStrategy *lodStrategy = new KisColorPickerStrokeStrategy(levelOfDetail); | ||
70 | connect(lodStrategy, &KisColorPickerStrokeStrategy::sigColorUpdated, | 70 | connect(lodStrategy, &KisColorPickerStrokeStrategy::sigColorUpdated, | ||
71 | this, &KisColorPickerStrokeStrategy::sigColorUpdated, | 71 | this, &KisColorPickerStrokeStrategy::sigColorUpdated, | ||
72 | Qt::DirectConnection); | 72 | Qt::DirectConnection); | ||
73 | return lodStrategy; | 73 | return lodStrategy; | ||
74 | } | 74 | } |