Skip to content

Commit 57f0037

Browse files
committed
Fix bugs
1 parent 1dbb1af commit 57f0037

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

src/plugins/audio/internal/addon/ProjectAudioAddOn.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <audio/TrackAudioContext.h>
3737
#include <audio/private/TrackAudioContext_p.h>
3838
#include <audio/internal/HashHelper.h>
39+
#include <audio/internal/AudioSystem.h>
3940

4041
#include <coreplugin/DspxDocument.h>
4142
#include <coreplugin/ProjectDocumentContext.h>
@@ -60,7 +61,7 @@ namespace Audio::Internal {
6061
}
6162

6263
ProjectAudioAddOn::~ProjectAudioAddOn() {
63-
if (m_context) {
64+
if (m_context && AudioSystem::outputSystem()) {
6465
GlobalAudioContext::preMixer()->removeSource(m_context->preMixer());
6566
if (m_metronomeAudioSource) {
6667
m_metronomeAudioSource->setDetector(nullptr);

src/plugins/coreplugin/internal/addon/WorkspaceAddOn.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,10 @@ namespace Core::Internal {
290290
std::ranges::transform(a, std::back_inserter(ret), [](const QString &id) {
291291
auto info = CoreInterface::actionRegistry()->actionInfo(id);
292292
auto actionIcon = CoreInterface::actionRegistry()->actionIcon("", info.icon());
293+
auto translatedText = info.text(true);
293294
return QVariantMap{
294295
{"id", id},
295-
{"text", info.text()},
296+
{"text", !translatedText.isEmpty() ? translatedText : info.text()},
296297
{"iconSource", actionIcon.url()},
297298
{"iconColor", QColor::fromString(actionIcon.currentColor())},
298299
{"unique", info.attributes().contains(QAK::ActionAttributeKey("uniquePanel", "http://schemas.diffscope.org/diffscope/actions/diffscope"))}

src/plugins/coreplugin/qml/actions/WorkspaceAddOnActions.qml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@ ActionCollection {
275275
d.helper.promptAddAction(o)
276276
}
277277
}
278-
readonly property Component menuSeparatorComponent: MenuSeparator {}
279278
onPanelEntriesChanged: () => {
280279
while (count) {
281280
if (!itemAt(0))
@@ -286,9 +285,6 @@ ActionCollection {
286285
let action = panelEntryActionComponent.createObject(this, {panelEntry: entry})
287286
addAction(action)
288287
}
289-
if (panelEntries.length !== 0) {
290-
addItem(menuSeparatorComponent.createObject(null))
291-
}
292288
addAction(addActionActionComponent.createObject(this))
293289
}
294290
}

0 commit comments

Comments
 (0)