From a4be9f00bbec735b2a01d0d5b0befbe4d900daeb Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 26 Sep 2022 21:04:35 +0100 Subject: [PATCH] Restore positions of external patchbay graph nodes Signed-off-by: falkTX --- source/backend/engine/CarlaEngineGraph.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/backend/engine/CarlaEngineGraph.cpp b/source/backend/engine/CarlaEngineGraph.cpp index e9163df39..d92154d4a 100644 --- a/source/backend/engine/CarlaEngineGraph.cpp +++ b/source/backend/engine/CarlaEngineGraph.cpp @@ -341,6 +341,7 @@ void ExternalGraph::setGroupPos(const bool sendHost, const bool sendOSC, const uint groupId, const int x1, const int y1, const int x2, const int y2) { CARLA_SAFE_ASSERT_UINT_RETURN(groupId >= kExternalGraphGroupCarla && groupId < kExternalGraphGroupMax, groupId,); + carla_debug("ExternalGraph::setGroupPos(%s, %s, %u, %i, %i, %i, %i)", bool2str(sendHost), bool2str(sendOSC), groupId, x1, y1, x2, y2); const PatchbayPosition ppos = { true, x1, y1, x2, y2 }; positions[groupId] = ppos; @@ -546,6 +547,20 @@ void ExternalGraph::refresh(const bool sendHost, const bool sendOSC, const char* portNameToId.name); } } + + // positions + for (uint i=kExternalGraphGroupCarla; icallback(sendHost, sendOSC, + ENGINE_CALLBACK_PATCHBAY_CLIENT_POSITION_CHANGED, + i, eppos.x1, eppos.y1, eppos.x2, static_cast(eppos.y2), + nullptr); + } } const char* const* ExternalGraph::getConnections() const noexcept