Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/tool/kis_tool_paint.cc
Show First 20 Lines • Show All 393 Lines • ▼ Show 20 Line(s) | 392 | if (color.isValid() && !color.alpha() == 0) { | |||
---|---|---|---|---|---|
394 | return; | 394 | return; | ||
395 | } | 395 | } | ||
396 | } | 396 | } | ||
397 | } | 397 | } | ||
398 | 398 | | |||
399 | KisPaintDeviceSP device = fromCurrentNode ? | 399 | KisPaintDeviceSP device = fromCurrentNode ? | ||
400 | currentNode()->colorPickSourceDevice() : image()->projection(); | 400 | currentNode()->colorPickSourceDevice() : image()->projection(); | ||
401 | 401 | | |||
402 | // Used for color picker blending. | ||||
403 | KoColor currentColor = canvas()->resourceManager()->foregroundColor(); | ||||
404 | if( pickingJob.action == PickBgNode || pickingJob.action == PickBgImage ){ | ||||
405 | currentColor = canvas()->resourceManager()->backgroundColor(); | ||||
406 | } | ||||
407 | | ||||
402 | image()->addJob(m_pickerStrokeId, | 408 | image()->addJob(m_pickerStrokeId, | ||
403 | new KisColorPickerStrokeStrategy::Data(device, imagePoint)); | 409 | new KisColorPickerStrokeStrategy::Data(device, imagePoint, currentColor)); | ||
404 | } | 410 | } | ||
405 | 411 | | |||
406 | void KisToolPaint::beginAlternateAction(KoPointerEvent *event, AlternateAction action) | 412 | void KisToolPaint::beginAlternateAction(KoPointerEvent *event, AlternateAction action) | ||
407 | { | 413 | { | ||
408 | if (isPickingAction(action)) { | 414 | if (isPickingAction(action)) { | ||
409 | KIS_ASSERT_RECOVER_RETURN(!m_pickerStrokeId); | 415 | KIS_ASSERT_RECOVER_RETURN(!m_pickerStrokeId); | ||
410 | setMode(SECONDARY_PAINT_MODE); | 416 | setMode(SECONDARY_PAINT_MODE); | ||
411 | 417 | | |||
▲ Show 20 Lines • Show All 400 Lines • Show Last 20 Lines |