Commit 57224ee3 authored by Sven Langkamp's avatar Sven Langkamp
Browse files

use node projection for select continous so that you can also select on shape layers

don't show the cursor forever in case something fails
BUG:265795
parent af856e12
......@@ -66,15 +66,15 @@ void KisToolSelectContiguous::mousePressEvent(KoPointerEvent *event)
if(PRESS_CONDITION(event, KisTool::HOVER_MODE,
Qt::LeftButton, Qt::NoModifier)) {
QApplication::setOverrideCursor(KisCursor::waitCursor());
if (!currentNode())
return;
KisPaintDeviceSP dev = currentNode()->paintDevice();
KisPaintDeviceSP dev = currentNode()->projection();
if (!dev || !currentNode()->visible())
return;
QApplication::setOverrideCursor(KisCursor::waitCursor());
QPoint pos = convertToIntPixelCoord(event);
QRect rc = currentImage()->bounds();
KisFillPainter fillpainter(dev);
......@@ -86,8 +86,10 @@ void KisToolSelectContiguous::mousePressEvent(KoPointerEvent *event)
fillpainter.createFloodSelection(pos.x(), pos.y(), currentImage()->mergedImage());
KisCanvas2 * kisCanvas = dynamic_cast<KisCanvas2*>(canvas());
if (!kisCanvas)
if (!kisCanvas) {
QApplication::restoreOverrideCursor();
return;
}
KisSelectionToolHelper helper(kisCanvas, currentNode(), i18n("Contiguous Area Selection"));
helper.selectPixelSelection(selection->pixelSelection(), m_selectAction);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment