Skip to content

Commit 7eea73e

Browse files
authored
Fix rotopaint overlay 2.5 (#986)
* RotoPaint: always draw the overlay when the tool is part of the overlay
1 parent 4253886 commit 7eea73e

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

Engine/RotoPaint.cpp

Lines changed: 29 additions & 3 deletions
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) ) {
@@ -2751,8 +2767,10 @@ RotoPaint::onOverlayPenMotion(double time,
27512767
} else if (lastHoverState != eHoverStateNothing) {
27522768
newState = eHoverStateNothing;
27532769
}
2754-
redraw = _imp->ui->hoverState != newState;
2755-
_imp->ui->hoverState = newState;
2770+
if (_imp->ui->hoverState != newState) {
2771+
redraw = true;
2772+
_imp->ui->hoverState = newState;
2773+
}
27562774
}
27572775
const bool featherVisible = _imp->ui->isFeatherVisible();
27582776

@@ -3161,7 +3179,15 @@ RotoPaint::onOverlayPenUp(double /*time*/,
31613179
**/
31623180
setCurrentCursor(eCursorBusy);
31633181
context->evaluateNeatStrokeRender();
3164-
setCurrentCursor(eCursorDefault);
3182+
if ( context->isRotoPaint() &&
3183+
( ( _imp->ui->selectedRole == eRotoRoleMergeBrush) ||
3184+
( _imp->ui->selectedRole == eRotoRoleCloneBrush) ||
3185+
( _imp->ui->selectedRole == eRotoRolePaintBrush) ||
3186+
( _imp->ui->selectedRole == eRotoRoleEffectBrush) ) ) {
3187+
setCurrentCursor(eCursorCross);
3188+
} else {
3189+
setCurrentCursor(eCursorDefault);
3190+
}
31653191
_imp->ui->strokeBeingPaint->setStrokeFinished();
31663192
ret = true;
31673193
}

0 commit comments

Comments
 (0)