mirror of
https://github.com/dscyrescotti/Memola.git
synced 2026-07-15 09:12:44 +02:00
refactor: clean up
This commit is contained in:
@@ -48,7 +48,7 @@ final class GraphicContext: @unchecked Sendable {
|
|||||||
switch stroke.style {
|
switch stroke.style {
|
||||||
case .marker:
|
case .marker:
|
||||||
guard let penStroke = stroke.stroke(as: PenStroke.self) else { return }
|
guard let penStroke = stroke.stroke(as: PenStroke.self) else { return }
|
||||||
let deletedStroke = tree.remove(penStroke.anyStroke, in: penStroke.strokeBox)
|
tree.remove(penStroke.anyStroke, in: penStroke.strokeBox)
|
||||||
withPersistence(\.backgroundContext) { [weak penStroke] context in
|
withPersistence(\.backgroundContext) { [weak penStroke] context in
|
||||||
penStroke?.object?.graphicContext = nil
|
penStroke?.object?.graphicContext = nil
|
||||||
try context.saveIfNeeded()
|
try context.saveIfNeeded()
|
||||||
|
|||||||
Reference in New Issue
Block a user