diff --git a/src/frontend/admin/src/components/SniperLocator.js b/src/frontend/admin/src/components/SniperLocator.js index c09f95303..e6925fee2 100644 --- a/src/frontend/admin/src/components/SniperLocator.js +++ b/src/frontend/admin/src/components/SniperLocator.js @@ -158,8 +158,6 @@ const SniperViewManager = ({ service }) => { teamId: selectedTeamCdsId, }; service.moveWithSettings(settings); - setSelectedInstance(undefined); - setSelectedTeamId(undefined); }, [selectedInstance, selectedTeamId, service]); const onShow = useCallback(() => { @@ -168,12 +166,12 @@ const SniperViewManager = ({ service }) => { teamId: selectedTeamCdsId, }; service.showWithSettings(settings); - setSelectedInstance(undefined); - setSelectedTeamId(undefined); }, [selectedInstance, selectedTeamId, service]); const onHide = useCallback(() => { service.hide(); + setSelectedInstance(undefined); + setSelectedTeamId(undefined); }, [service]); return ( @@ -228,6 +226,11 @@ const SniperViewManager = ({ service }) => { variant="contained" onClick={onShow}>Show locator + )} diff --git a/src/sniper-locator-controller/src/main/kotlin/org/icpclive/sniper/Util.kt b/src/sniper-locator-controller/src/main/kotlin/org/icpclive/sniper/Util.kt index 3d8bd4447..f23a35cee 100644 --- a/src/sniper-locator-controller/src/main/kotlin/org/icpclive/sniper/Util.kt +++ b/src/sniper-locator-controller/src/main/kotlin/org/icpclive/sniper/Util.kt @@ -76,7 +76,6 @@ object Util { fun loadLocatorPoints(sniperNumber: Int): List { val x = config.configDirectory.resolve("coordinates-$sniperNumber.txt") - println(x.readText()) val scanner = Scanner(x) val n = scanner.nextInt() @@ -89,9 +88,7 @@ object Util { scanner.nextDouble(), scanner.nextDouble() ) - println("$point") allPoints.add(point) - } catch (e: Throwable) { println("sooo bad $e") }