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 } )
|
||||
| strokeVisible
|
||||
, 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.
|
||||
, Just ( brush@( NamedBrush {} ) :: NamedBrush brushFields ) <- strokeBrush
|
||||
, Intersection { inject2 = updateBrushParams, project1 = ptParamsToUsedParams }
|
||||
|
@ -1108,13 +1105,16 @@ applyBrushWidgetAction pressingCtrl pressingAlt c mbPrevAction doc@( Document {
|
|||
Just ( ABrushWidgetActionState @brushFields'
|
||||
prevAction@( BrushWidgetActionState
|
||||
{ brushWidgetPointBeingMoved = oldPt
|
||||
, brushWidgetStrokeUnique = actionUniq
|
||||
, brushWidgetPointIndex = j'
|
||||
, brushWidgetAction = act } ) ) ->
|
||||
if
|
||||
| Just Refl <- eqT @brushFields @brushFields'
|
||||
, uniq == actionUniq
|
||||
, j == j'
|
||||
-- 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
|
||||
let
|
||||
newPt = pointCoords pt --> c
|
||||
|
|
Loading…
Reference in a new issue