From 236692cd5dc95c513edb55619ff3ef6b1fb63721 Mon Sep 17 00:00:00 2001 From: Frank Osterfeld Date: Fri, 15 Mar 2024 11:00:52 +0100 Subject: [PATCH] When adding a new sink, also add a plot for it (#174) * When adding a new sink, also add a plot for it * Update opencmw-cpp * service: Fix DNS signal unregistration --- cmake/Dependencies.cmake | 2 +- src/service/main.cpp | 1 + src/ui/cmake/Dependencies.cmake | 2 +- src/ui/main.cpp | 6 +++++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index a394e2c..ef2ba8a 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -3,7 +3,7 @@ include(FetchContent) FetchContent_Declare( opencmw-cpp GIT_REPOSITORY https://github.com/fair-acc/opencmw-cpp.git - GIT_TAG 48e9305d1a72dcb406ff8a6e7ae0b791b0d0802a # main as of 2024-02-29 + GIT_TAG c7236c423f4f1f4de8a762c1e946f6ad76cd0a8d # main as of 2024-03-13 ) FetchContent_Declare( diff --git a/src/service/main.cpp b/src/service/main.cpp index f5243e3..6e85d57 100644 --- a/src/service/main.cpp +++ b/src/service/main.cpp @@ -199,6 +199,7 @@ int main(int argc, char **argv) { toRegisterEntries.insert(toRegisterEntries.end(), dns.begin(), dns.end()); } dns_client.registerSignals(std::move(toRegisterEntries)); + registeredSignals = std::move(signals); }); std::jthread grAcqWorkerThread([&grAcqWorker] { grAcqWorker.run(); }); diff --git a/src/ui/cmake/Dependencies.cmake b/src/ui/cmake/Dependencies.cmake index 9078e69..2fdac13 100644 --- a/src/ui/cmake/Dependencies.cmake +++ b/src/ui/cmake/Dependencies.cmake @@ -43,7 +43,7 @@ FetchContent_Declare( # needed to load images in ImGui FetchContent_Declare( opencmw-cpp GIT_REPOSITORY https://github.com/fair-acc/opencmw-cpp.git - GIT_TAG 48e9305d1a72dcb406ff8a6e7ae0b791b0d0802a # main as of 2024-02-29 + GIT_TAG c7236c423f4f1f4de8a762c1e946f6ad76cd0a8d # main as of 2024-03-13 ) FetchContent_Declare( diff --git a/src/ui/main.cpp b/src/ui/main.cpp index b38e3b1..fbd2a59 100644 --- a/src/ui/main.cpp +++ b/src/ui/main.cpp @@ -224,7 +224,11 @@ int main(int argc, char **argv) { app.sdlState = &sdlState; app.fgItem.newSinkCallback = [&](DigitizerUi::FlowGraph *) mutable { - return app.dashboard->createSink(); + auto newSink = app.dashboard->createSink(); + app.dashboardPage.newPlot(app.dashboard.get()); + auto &plot = app.dashboard->plots().back(); + plot.sourceNames.push_back(newSink->name); + return newSink; }; app.fgItem.newSinkSourceCallback = [&](DigitizerUi::FlowGraph *) mutable { return app.dashboard->createSource();