Skip to content

Commit 08b1c1a

Browse files
committed
RotoPaint: always draw the overlay when the tool is part of the overlay
1 parent 4253886 commit 08b1c1a

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

Engine/RotoPaint.cpp

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2727,6 +2727,22 @@ RotoPaint::onOverlayPenMotion(double time,
27272727
cursorSet = true;
27282728
}
27292729

2730+
switch (_imp->ui->selectedTool) {
2731+
case eRotoToolSolidBrush:
2732+
case eRotoToolEraserBrush:
2733+
case eRotoToolClone:
2734+
case eRotoToolReveal:
2735+
case eRotoToolBlur:
2736+
case eRotoToolSharpen:
2737+
case eRotoToolSmear:
2738+
case eRotoToolDodge:
2739+
case eRotoToolBurn: {
2740+
redraw = true; // Those tools use the overlay to draw the tool
2741+
}
2742+
default:
2743+
break;
2744+
} // switch
2745+
27302746
if ( !cursorSet && _imp->ui->showCpsBbox && (_imp->ui->state != eEventStateDraggingControlPoint) && (_imp->ui->state != eEventStateDraggingSelectedControlPoints)
27312747
&& ( _imp->ui->state != eEventStateDraggingLeftTangent) &&
27322748
( _imp->ui->state != eEventStateDraggingRightTangent) ) {
@@ -3161,7 +3177,15 @@ RotoPaint::onOverlayPenUp(double /*time*/,
31613177
**/
31623178
setCurrentCursor(eCursorBusy);
31633179
context->evaluateNeatStrokeRender();
3164-
setCurrentCursor(eCursorDefault);
3180+
if ( context->isRotoPaint() &&
3181+
( ( _imp->ui->selectedRole == eRotoRoleMergeBrush) ||
3182+
( _imp->ui->selectedRole == eRotoRoleCloneBrush) ||
3183+
( _imp->ui->selectedRole == eRotoRolePaintBrush) ||
3184+
( _imp->ui->selectedRole == eRotoRoleEffectBrush) ) ) {
3185+
setCurrentCursor(eCursorCross);
3186+
} else {
3187+
setCurrentCursor(eCursorDefault);
3188+
}
31653189
_imp->ui->strokeBeingPaint->setStrokeFinished();
31663190
ret = true;
31673191
}

0 commit comments

Comments
 (0)