Skip to content

Commit 055d60d

Browse files
committed
Session: create instrument state after preloading
1 parent 82bc985 commit 055d60d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/ngscopeclient/Session.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,6 +1240,10 @@ bool Session::PreLoadOscilloscope(int version, const YAML::Node& node, bool onli
12401240
//Make any config settings to the instrument from our preference settings
12411241
ApplyPreferences(scope);
12421242

1243+
//Run the preload before adding to the list of scopes since we need to have the channel count etc valid
1244+
//before we call AddInstrument()
1245+
scope->PreLoadConfiguration(version, node, m_idtable, m_warnings);
1246+
12431247
//All good. Add to our list of scopes etc
12441248
AddInstrument(scope, false);
12451249
m_idtable.emplace(node["id"].as<uintptr_t>(), (Instrument*)scope.get());
@@ -1248,9 +1252,6 @@ bool Session::PreLoadOscilloscope(int version, const YAML::Node& node, bool onli
12481252
if(node["triggerdeskew"])
12491253
m_scopeDeskewCal[scope] = node["triggerdeskew"].as<int64_t>();
12501254

1251-
//Run the preload
1252-
scope->PreLoadConfiguration(version, node, m_idtable, m_warnings);
1253-
12541255
return true;
12551256
}
12561257

0 commit comments

Comments
 (0)