Skip to content

Commit

Permalink
Fix disapearing group sidebar; start UI messages (#1408)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
baconpaul authored Oct 5, 2024
1 parent 1c1f836 commit bf42876
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src-ui/app/SCXTEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src-ui/app/edit-screen/components/PartGroupSidebar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ struct GroupSidebar : GroupZoneSidebarBase<GroupSidebar, false>
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);
Expand Down
5 changes: 5 additions & 0 deletions src-ui/app/editor-impl/SCXTEditorResponseHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions src/engine/group_triggers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<GroupTriggerConditions::Conjunction,
Expand All @@ -85,7 +86,6 @@ GroupTriggerConditions::Conjunction fromStringConditionsConjunction(const std::s

struct GTMacro : GroupTrigger
{

GTMacro(GroupTriggerInstrumentState &onState, GroupTriggerStorage &onStorage)
: GroupTrigger(onState, onStorage)
{
Expand Down
2 changes: 2 additions & 0 deletions src/messaging/client/client_serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ enum SerializationToClientMessageIds
s2c_update_zone_output_info,
s2c_update_group_output_info,

s2c_send_group_trigger_conditions,

s2c_respond_single_processor_metadata_and_data,
s2c_notify_mismatched_processors_for_zone,

Expand Down
3 changes: 3 additions & 0 deletions src/messaging/client/group_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ using groupOutputInfoUpdate_t = std::pair<bool, engine::Group::GroupOutputInfo>;
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<float>, engine::Group::GroupOutputInfo,
detail::updateGroupMemberValue(&engine::Group::outputInfo, payload,
Expand Down
3 changes: 3 additions & 0 deletions src/selection/selection_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit bf42876

Please sign in to comment.