diff --git a/app-desktop/src/main/kotlin/kst4contest/view/compose/wizard/WizardStationCopy.kt b/app-desktop/src/main/kotlin/kst4contest/view/compose/wizard/WizardStationCopy.kt index f676e3d0..0a87128c 100644 --- a/app-desktop/src/main/kotlin/kst4contest/view/compose/wizard/WizardStationCopy.kt +++ b/app-desktop/src/main/kotlin/kst4contest/view/compose/wizard/WizardStationCopy.kt @@ -87,6 +87,8 @@ internal fun copyStation(from: ChatPreferences, to: ChatPreferences) { to.setTrxSynch_so2rEnabled(from.isTrxSynch_so2rEnabled()) to.setNotify_dxClusterServerEnabled(from.isNotify_dxClusterServerEnabled()) to.setNotify_dxclusterServerPort(from.getNotify_dxclusterServerPort()) + // The band a frequency given without one is completed with; it has to fit the bands above. + to.setNotify_optionalFrequencyPrefix(from.getNotify_optionalFrequencyPrefix().get()) // Rotators. to.setStn_pstRotatorEnabled(from.isStn_pstRotatorEnabled()) diff --git a/app-desktop/src/test/kotlin/kst4contest/view/compose/wizard/WizardStationCopyTest.kt b/app-desktop/src/test/kotlin/kst4contest/view/compose/wizard/WizardStationCopyTest.kt index 5b99ed7e..732231be 100644 --- a/app-desktop/src/test/kotlin/kst4contest/view/compose/wizard/WizardStationCopyTest.kt +++ b/app-desktop/src/test/kotlin/kst4contest/view/compose/wizard/WizardStationCopyTest.kt @@ -168,4 +168,15 @@ class WizardStationCopyTest { assertEquals(2, donor.getLoginChatCategoryMain().categoryNumber, "the two profiles must not share a category object") } + + @Test + fun theFallbackBandComesWithTheStation() { + // It completes frequencies given without a band, so it has to fit the station's bands. + val donor = prefs { setNotify_optionalFrequencyPrefix("432") } + val target = prefs { setNotify_optionalFrequencyPrefix("144") } + + copyStation(donor, target) + + assertEquals("432", target.getNotify_optionalFrequencyPrefix().get()) + } } diff --git a/app-desktop/src/test/resources/wizard-other-setters.txt b/app-desktop/src/test/resources/wizard-other-setters.txt index 15e5905f..53e8b78f 100644 --- a/app-desktop/src/test/resources/wizard-other-setters.txt +++ b/app-desktop/src/test/resources/wizard-other-setters.txt @@ -57,7 +57,6 @@ setNotify_bandUpgradeHintOnLogEnabled setNotify_bandUpgradePriorityBoostEnabled setNotify_momentumWindowSeconds setNotify_noReplyPenaltyMinutes -setNotify_optionalFrequencyPrefix setNotify_playCWCallsignsOnRxedPMs setNotify_playSimpleSounds setNotify_playVoiceCallsignsOnRxedPMs diff --git a/app-desktop/src/test/resources/wizard-station-setters.txt b/app-desktop/src/test/resources/wizard-station-setters.txt index 3e5da841..7da1ac25 100644 --- a/app-desktop/src/test/resources/wizard-station-setters.txt +++ b/app-desktop/src/test/resources/wizard-station-setters.txt @@ -25,6 +25,7 @@ setLogsynch_wintestSkedMode setLogsynch_wintestUsePassQrg setNotify_dxClusterServerEnabled setNotify_dxclusterServerPort +setNotify_optionalFrequencyPrefix setStn_antennaBeamWidthDeg setStn_bandActive10G setStn_bandActive1240