From bf42876316e7f7b67d5e321c1d142fd1e74e4bc2 Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 5 Oct 2024 13:19:21 -0400 Subject: [PATCH] Fix disapearing group sidebar; start UI messages (#1408) Start the UI message for group triggers but along the way realize my last commit removed the group sidebar selection tree Ooops! So do a quick merge to fix it. --- src-ui/app/SCXTEditor.h | 2 ++ src-ui/app/edit-screen/components/PartGroupSidebar.cpp | 1 + src-ui/app/editor-impl/SCXTEditorResponseHandlers.cpp | 5 +++++ src/engine/group_triggers.cpp | 4 ++-- src/messaging/client/client_serial.h | 2 ++ src/messaging/client/group_messages.h | 3 +++ src/selection/selection_manager.cpp | 3 +++ 7 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src-ui/app/SCXTEditor.h b/src-ui/app/SCXTEditor.h index 176e46a3..1056c31c 100644 --- a/src-ui/app/SCXTEditor.h +++ b/src-ui/app/SCXTEditor.h @@ -213,6 +213,8 @@ struct SCXTEditor : sst::jucegui::components::WindowPanel, juce::DragAndDropCont void onGroupMatrixMetadata(const scxt::modulation::groupMatrixMetadata_t &); void onGroupMatrix(const scxt::modulation::GroupMatrix::RoutingTable &); + void onGroupTriggerConditions(const scxt::engine::GroupTriggerConditions &); + void onGroupOrZoneModulatorStorageUpdated( const scxt::messaging::client::indexedModulatorStorageUpdate_t &); void onZoneOutputInfoUpdated(const scxt::messaging::client::zoneOutputInfoUpdate_t &p); diff --git a/src-ui/app/edit-screen/components/PartGroupSidebar.cpp b/src-ui/app/edit-screen/components/PartGroupSidebar.cpp index 5efacb03..2379c9b6 100644 --- a/src-ui/app/edit-screen/components/PartGroupSidebar.cpp +++ b/src-ui/app/edit-screen/components/PartGroupSidebar.cpp @@ -250,6 +250,7 @@ struct GroupSidebar : GroupZoneSidebarBase auto dividerHeight = 8; auto lb = b.withTrimmedBottom(trigHeight + settingsHeight + 2 * dividerHeight); + listBox->setBounds(lb); auto tb = b.withY(lb.getBottom()).withHeight(dividerHeight); triggersDivider->setBounds(tb); tb = tb.translated(0, dividerHeight).withHeight(trigHeight); diff --git a/src-ui/app/editor-impl/SCXTEditorResponseHandlers.cpp b/src-ui/app/editor-impl/SCXTEditorResponseHandlers.cpp index 3e764099..91ca7f1d 100644 --- a/src-ui/app/editor-impl/SCXTEditorResponseHandlers.cpp +++ b/src-ui/app/editor-impl/SCXTEditorResponseHandlers.cpp @@ -444,4 +444,9 @@ void SCXTEditor::onMissingResolutionWorkItemList( missingResolutionScreen->toFront(true); } } + +void SCXTEditor::onGroupTriggerConditions(scxt::engine::GroupTriggerConditions const &g) +{ + SCLOG_ONCE("Implement: On Group Trigger Conditions"); +} } // namespace scxt::ui::app \ No newline at end of file diff --git a/src/engine/group_triggers.cpp b/src/engine/group_triggers.cpp index cc9a81a8..270fc455 100644 --- a/src/engine/group_triggers.cpp +++ b/src/engine/group_triggers.cpp @@ -71,7 +71,8 @@ std::string GroupTriggerConditions::toStringGroupConditionsConjunction(const Con } return "a"; } -GroupTriggerConditions::Conjunction fromStringConditionsConjunction(const std::string &s) +GroupTriggerConditions::Conjunction +GroupTriggerConditions::fromStringConditionsConjunction(const std::string &s) { static auto inverse = makeEnumInverse; SERIAL_TO_CLIENT(GroupOutputInfoUpdated, s2c_update_group_output_info, groupOutputInfoUpdate_t, onGroupOutputInfoUpdated); +SERIAL_TO_CLIENT(SendGroupTriggerConditions, s2c_send_group_trigger_conditions, + scxt::engine::GroupTriggerConditions, onGroupTriggerConditions) + CLIENT_TO_SERIAL_CONSTRAINED(UpdateGroupOutputFloatValue, c2s_update_group_output_float_value, detail::diffMsg_t, engine::Group::GroupOutputInfo, detail::updateGroupMemberValue(&engine::Group::outputInfo, payload, diff --git a/src/selection/selection_manager.cpp b/src/selection/selection_manager.cpp index 2b7803f4..10d5c85f 100644 --- a/src/selection/selection_manager.cpp +++ b/src/selection/selection_manager.cpp @@ -627,6 +627,9 @@ void SelectionManager::sendDisplayDataForSingleGroup(int part, int group) modulation::getGroupMatrixMetadata(*g), *(engine.getMessageController())); serializationSendToClient(cms::s2c_update_group_matrix, rt, *(engine.getMessageController())); + + serializationSendToClient(cms::s2c_send_group_trigger_conditions, g->triggerConditions, + *(engine.getMessageController())); } void SelectionManager::sendDisplayDataForNoGroupSelected()