mirror of
https://gitlab.com/sheaf/metabrush.git
synced 2024-11-05 14:53:37 +00:00
allow brush widget to modify different strokes
This commit is contained in:
parent
3fe46fc029
commit
b0a17c80ec
|
@ -974,9 +974,6 @@ applyBrushWidgetAction pressingCtrl pressingAlt c mbPrevAction doc@( Document {
|
||||||
( StrokeMetadata { strokeVisible, strokeLocked } )
|
( StrokeMetadata { strokeVisible, strokeLocked } )
|
||||||
| strokeVisible
|
| strokeVisible
|
||||||
, not strokeLocked
|
, not strokeLocked
|
||||||
-- If we have already started a widget action, only continue an action
|
|
||||||
-- for the stroke with the correct unique.
|
|
||||||
, case mbPrevAction of { Just ( ABrushWidgetActionState act ) -> brushWidgetStrokeUnique act == u; Nothing -> True }
|
|
||||||
-- Don't touch strokes without brushes.
|
-- Don't touch strokes without brushes.
|
||||||
, Just ( brush@( NamedBrush {} ) :: NamedBrush brushFields ) <- strokeBrush
|
, Just ( brush@( NamedBrush {} ) :: NamedBrush brushFields ) <- strokeBrush
|
||||||
, Intersection { inject2 = updateBrushParams, project1 = ptParamsToUsedParams }
|
, Intersection { inject2 = updateBrushParams, project1 = ptParamsToUsedParams }
|
||||||
|
@ -1108,13 +1105,16 @@ applyBrushWidgetAction pressingCtrl pressingAlt c mbPrevAction doc@( Document {
|
||||||
Just ( ABrushWidgetActionState @brushFields'
|
Just ( ABrushWidgetActionState @brushFields'
|
||||||
prevAction@( BrushWidgetActionState
|
prevAction@( BrushWidgetActionState
|
||||||
{ brushWidgetPointBeingMoved = oldPt
|
{ brushWidgetPointBeingMoved = oldPt
|
||||||
|
, brushWidgetStrokeUnique = actionUniq
|
||||||
, brushWidgetPointIndex = j'
|
, brushWidgetPointIndex = j'
|
||||||
, brushWidgetAction = act } ) ) ->
|
, brushWidgetAction = act } ) ) ->
|
||||||
if
|
if
|
||||||
| Just Refl <- eqT @brushFields @brushFields'
|
| Just Refl <- eqT @brushFields @brushFields'
|
||||||
|
, uniq == actionUniq
|
||||||
, j == j'
|
, j == j'
|
||||||
-- Continue the current brush widget action,
|
-- Continue the current brush widget action,
|
||||||
-- at the point with the correct index in the stroke.
|
-- but only for the right stroke and only at the point with
|
||||||
|
-- the correct index within the stroke.
|
||||||
-> do
|
-> do
|
||||||
let
|
let
|
||||||
newPt = pointCoords pt --> c
|
newPt = pointCoords pt --> c
|
||||||
|
|
Loading…
Reference in a new issue