Skip to content

Commit

Permalink
RotoPaint: always draw the overlay when the tool is part of the overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Jul 19, 2024
1 parent 4253886 commit 08b1c1a
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion Engine/RotoPaint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2727,6 +2727,22 @@ RotoPaint::onOverlayPenMotion(double time,
cursorSet = true;
}

switch (_imp->ui->selectedTool) {
case eRotoToolSolidBrush:
case eRotoToolEraserBrush:
case eRotoToolClone:
case eRotoToolReveal:
case eRotoToolBlur:
case eRotoToolSharpen:
case eRotoToolSmear:
case eRotoToolDodge:
case eRotoToolBurn: {
redraw = true; // Those tools use the overlay to draw the tool
}
default:
break;
} // switch

if ( !cursorSet && _imp->ui->showCpsBbox && (_imp->ui->state != eEventStateDraggingControlPoint) && (_imp->ui->state != eEventStateDraggingSelectedControlPoints)
&& ( _imp->ui->state != eEventStateDraggingLeftTangent) &&
( _imp->ui->state != eEventStateDraggingRightTangent) ) {
Expand Down Expand Up @@ -3161,7 +3177,15 @@ RotoPaint::onOverlayPenUp(double /*time*/,
**/
setCurrentCursor(eCursorBusy);
context->evaluateNeatStrokeRender();
setCurrentCursor(eCursorDefault);
if ( context->isRotoPaint() &&
( ( _imp->ui->selectedRole == eRotoRoleMergeBrush) ||
( _imp->ui->selectedRole == eRotoRoleCloneBrush) ||
( _imp->ui->selectedRole == eRotoRolePaintBrush) ||
( _imp->ui->selectedRole == eRotoRoleEffectBrush) ) ) {
setCurrentCursor(eCursorCross);
} else {
setCurrentCursor(eCursorDefault);
}
_imp->ui->strokeBeingPaint->setStrokeFinished();
ret = true;
}
Expand Down

0 comments on commit 08b1c1a

Please sign in to comment.