save/load markers in setup

This commit is contained in:
Jan Käberich 2020-12-05 12:59:23 +01:00
parent 9ad8def2ea
commit 8d382e8b9c
9 changed files with 229 additions and 28 deletions

View file

@ -298,6 +298,7 @@ nlohmann::json SpectrumAnalyzer::toJSON()
nlohmann::json j;
j["traces"] = traceModel.toJSON();
j["tiles"] = central->toJSON();
j["markers"] = markerModel->toJSON();
return j;
}
@ -309,6 +310,9 @@ void SpectrumAnalyzer::fromJSON(nlohmann::json j)
if(j.contains("tiles")) {
central->fromJSON(j["tiles"]);
}
if(j.contains("markers")) {
markerModel->fromJSON(j["markers"]);
}
}
using namespace std;