mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 02:03:11 +02:00
Fix for unintended snapshots while parenting/un-parenting
This commit is contained in:
parent
afd69d04dd
commit
cc207537a3
1 changed files with 15 additions and 13 deletions
|
@ -4039,21 +4039,23 @@ void Application::keyPressEvent(QKeyEvent* event) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::Key_P: {
|
case Qt::Key_P: {
|
||||||
AudioInjectorOptions options;
|
if (!isShifted && !isMeta && !isOption && !event->isAutoRepeat()) {
|
||||||
options.localOnly = true;
|
AudioInjectorOptions options;
|
||||||
options.stereo = true;
|
options.localOnly = true;
|
||||||
Setting::Handle<bool> notificationSounds{ MenuOption::NotificationSounds, true};
|
options.stereo = true;
|
||||||
Setting::Handle<bool> notificationSoundSnapshot{ MenuOption::NotificationSoundsSnapshot, true};
|
Setting::Handle<bool> notificationSounds{ MenuOption::NotificationSounds, true };
|
||||||
if (notificationSounds.get() && notificationSoundSnapshot.get()) {
|
Setting::Handle<bool> notificationSoundSnapshot{ MenuOption::NotificationSoundsSnapshot, true };
|
||||||
if (_snapshotSoundInjector) {
|
if (notificationSounds.get() && notificationSoundSnapshot.get()) {
|
||||||
_snapshotSoundInjector->setOptions(options);
|
if (_snapshotSoundInjector) {
|
||||||
_snapshotSoundInjector->restart();
|
_snapshotSoundInjector->setOptions(options);
|
||||||
} else {
|
_snapshotSoundInjector->restart();
|
||||||
QByteArray samples = _snapshotSound->getByteArray();
|
} else {
|
||||||
_snapshotSoundInjector = AudioInjector::playSound(samples, options);
|
QByteArray samples = _snapshotSound->getByteArray();
|
||||||
|
_snapshotSoundInjector = AudioInjector::playSound(samples, options);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
takeSnapshot(true);
|
||||||
}
|
}
|
||||||
takeSnapshot(true);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue