Browse Source

Restore positions of external patchbay graph nodes

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.5.1
falkTX 2 years ago
parent
commit
a4be9f00bb
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 15 additions and 0 deletions
  1. +15
    -0
      source/backend/engine/CarlaEngineGraph.cpp

+ 15
- 0
source/backend/engine/CarlaEngineGraph.cpp View File

@@ -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) 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_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 }; const PatchbayPosition ppos = { true, x1, y1, x2, y2 };
positions[groupId] = ppos; positions[groupId] = ppos;
@@ -546,6 +547,20 @@ void ExternalGraph::refresh(const bool sendHost, const bool sendOSC, const char*
portNameToId.name); portNameToId.name);
} }
} }

// positions
for (uint i=kExternalGraphGroupCarla; i<kExternalGraphGroupMax; ++i)
{
const PatchbayPosition& eppos(positions[i]);

if (! eppos.active)
continue;

kEngine->callback(sendHost, sendOSC,
ENGINE_CALLBACK_PATCHBAY_CLIENT_POSITION_CHANGED,
i, eppos.x1, eppos.y1, eppos.x2, static_cast<float>(eppos.y2),
nullptr);
}
} }


const char* const* ExternalGraph::getConnections() const noexcept const char* const* ExternalGraph::getConnections() const noexcept


Loading…
Cancel
Save