[education/gcompris] src/activities/morse_code: morse_code, fix intro voice not playing
Johnny Jazeix <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 2806280c3340caa7725434e8fa69a9357e4d6e5d by Johnny Jazeix.
Committed on 29/07/2026 at 16:23.
Pushed by jjazeix into branch 'master'.
morse_code, fix intro voice not playing
M +9 -2 src/activities/morse_code/MorseCode.qml
https://invent.kde.org/education/gcompris/-/commit/2806280c3340caa7725434e8fa69a9357e4d6e5d
diff --git a/src/activities/morse_code/MorseCode.qml b/src/activities/morse_code/MorseCode.qml
index 75af335a0..37ee74b3c 100644
--- a/src/activities/morse_code/MorseCode.qml
+++ b/src/activities/morse_code/MorseCode.qml
@@ -75,6 +75,7 @@ ActivityBase {
property bool buttonsBlocked: false
readonly property string middleDot: '·'
readonly property var regexSpaceReplace: new RegExp(keyboard.space, "g")
+ property bool firstRun: true
onToAlphaChanged: {
textInput.text = ''
@@ -109,11 +110,17 @@ ActivityBase {
function initSubLevel() {
textInput.text = ''
- stopMorseSounds();
+ if(firstRun) {
+ // we want to have the intro voice on startup
+ firstRun = false
+ }
+ else {
+ stopMorseSounds();
+ }
questionValue = dataset[currentLevel].values[1][score.currentSubLevel]
questionValue = questionValue.replace(/\./g, items.middleDot);
questionValue = questionValue.replace(items.regexSpaceReplace, ' ');
- activity.audioVoices.clearQueue();
+ //activity.audioVoices.clearQueue();
// Play the audio at start of the sublevel
if(items.audioMode) {
delayTimer.restart();