X-Git-Url: https://git.r.bdr.sh/rbdr/map/blobdiff_plain/f93215a7b37e065a0a52a852bb2c35d2a3d77b0b..144915635bdfc90445321189914929a911fe77d4:/Map/MapApp.swift?ds=sidebyside diff --git a/Map/MapApp.swift b/Map/MapApp.swift index fa60ab0..4578bd8 100644 --- a/Map/MapApp.swift +++ b/Map/MapApp.swift @@ -1,3 +1,4 @@ +import Sparkle /* Copyright (C) 2024 Rubén Beltrán del Río @@ -15,16 +16,18 @@ along with this program. If not, see https://map.tranquil.systems. */ import SwiftUI -import Sparkle @main struct MapApp: App { - - private let updaterController: SPUStandardUpdaterController = SPUStandardUpdaterController(startingUpdater: true, updaterDelegate: nil, userDriverDelegate: nil) - + + private let updaterController: SPUStandardUpdaterController = SPUStandardUpdaterController( + startingUpdater: true, updaterDelegate: nil, userDriverDelegate: nil) + var body: some Scene { DocumentGroup(newDocument: MapDocument()) { file in MapEditor(document: file.$document, url: file.fileURL) + .focusedSceneValue(\.document, file.$document) + .focusedSceneValue(\.fileURL, file.fileURL) }.commands { MapCommands() UpdateCommands(updaterController: updaterController)