Commit 9b581aa6 authored by Timothée Giet's avatar Timothée Giet

memory, better fix to enable voices in memory-sound

parent d50908b4
......@@ -28,5 +28,5 @@ import "memorysounddataset.js" as Dataset
MemoryCommon {
dataset: Dataset.get()
backgroundImg: "qrc:/gcompris/src/activities/memory-sound/resource/gcompris_band.svg"
isMusicalActivity: true
needsVoices: true
}
......@@ -33,6 +33,7 @@ ActivityBase {
property string backgroundImg
property var dataset
property bool withTux: false
property bool needsVoices: false
onStart: focus = true
onStop: {}
......@@ -75,21 +76,16 @@ ActivityBase {
property int rows
property int spacing: 5 * ApplicationInfo.ratio
property bool isMultipleDatasetMode: activity.datasetLoader.data != 0
property bool audioVoicesConfig: false
}
onStart: {
Activity.start(items);
if(activity.isMusicalActivity) {
items.audioVoicesConfig = ApplicationSettings.isAudioVoicesEnabled;
ApplicationSettings.isAudioVoicesEnabled = true;
if(activity.needsVoices === true) {
activity.isMusicalActivity = true
}
}
onStop: {
if(activity.isMusicalActivity) {
ApplicationSettings.isAudioVoicesEnabled = items.audioVoicesConfig;
}
Activity.stop();
}
......
......@@ -90,7 +90,7 @@ Window {
GCAudio {
id: audioVoices
muted: !ApplicationSettings.isAudioVoicesEnabled
muted: !ApplicationSettings.isAudioVoicesEnabled && !main.isMusicalActivityRunning
Timer {
id: delayedWelcomeTimer
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment