Skip to content

Commit

Permalink
Fix a startup order refresh problem (#1435)
Browse files Browse the repository at this point in the history
The startup order and initialization sequence means that the
standalone juce which creates the ui before the first message
showed parts, and the plugin and clap-first did not. Fix this by
having a full refresh on editor, which is appropriate anyway.
  • Loading branch information
baconpaul authored Oct 25, 2024
1 parent b98aec1 commit 4225533
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src-ui/app/editor-impl/SCXTEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,6 @@ SCXTEditor::SCXTEditor(messaging::MessageController &e, infrastructure::Defaults
toolTip = std::make_unique<sst::jucegui::components::ToolTip>();
addChildComponent(*toolTip);

namespace cmsg = scxt::messaging::client;
msgCont.registerClient("SCXTEditor", [this](auto &s) {
{
// Remember this runs on the serialization thread so needs to be thread safe
std::lock_guard<std::mutex> g(callbackMutex);
callbackQueue.push(s);
}
juce::MessageManager::callAsync([this]() { drainCallbackQueue(); });
});

headerRegion = std::make_unique<shared::HeaderRegion>(this);
addAndMakeVisible(*headerRegion);

Expand Down Expand Up @@ -139,6 +129,16 @@ SCXTEditor::SCXTEditor(messaging::MessageController &e, infrastructure::Defaults

focusDebugger = std::make_unique<sst::jucegui::accessibility::FocusDebugger>(*this);
focusDebugger->setDoFocusDebug(false);

namespace cmsg = scxt::messaging::client;
msgCont.registerClient("SCXTEditor", [this](auto &s) {
{
// Remember this runs on the serialization thread so needs to be thread safe
std::lock_guard<std::mutex> g(callbackMutex);
callbackQueue.push(s);
}
juce::MessageManager::callAsync([this]() { drainCallbackQueue(); });
});
}

SCXTEditor::~SCXTEditor() noexcept
Expand Down
2 changes: 2 additions & 0 deletions src/messaging/client/structure_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ inline void doRegisterClient(engine::Engine &engine, MessageController &cont)
engine.getSelectionManager()->selectAction(sac);
}
engine.getSelectionManager()->sendSelectedPartMacrosToClient();

engine.sendFullRefreshToClient();
}
CLIENT_TO_SERIAL(RegisterClient, c2s_register_client, bool, doRegisterClient(engine, cont));

Expand Down

0 comments on commit 4225533

Please sign in to comment.