mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-04 14:07:30 +00:00
save/load markers in setup
This commit is contained in:
parent
9ad8def2ea
commit
8d382e8b9c
9 changed files with 229 additions and 28 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue