Reset mask when clicking outside of bounds with the magic wand tool (fix #4490, #4595)

This commit is contained in:
Christian Kaiser 2024-08-15 09:13:18 -03:00 committed by GitHub
parent 0bdcdbfc49
commit 4df11ac1e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -152,6 +152,12 @@ bool ToolLoopManager::releaseButton(const Pointer& pointer)
if (isCanceled()) if (isCanceled())
return false; return false;
if (m_toolLoop->getController()->isOnePoint() &&
m_toolLoop->getInk()->isSelection() &&
!m_toolLoop->getSrcImage()->bounds().contains(pointer.point())) {
return false;
}
Stroke::Pt spritePoint = getSpriteStrokePt(pointer); Stroke::Pt spritePoint = getSpriteStrokePt(pointer);
bool res = m_toolLoop->getController()->releaseButton(m_stroke, spritePoint); bool res = m_toolLoop->getController()->releaseButton(m_stroke, spritePoint);