This was seriously fucked up :) Now it seems OK.

This commit is contained in:
vsonnier
2016-06-13 21:31:17 +02:00
parent 8ff4176bd9
commit 4def8ee0f1
3 changed files with 47 additions and 30 deletions
+1 -7
View File
@@ -1562,8 +1562,6 @@ void AppFrame::saveSession(std::string fileName) {
*demod->newChild("frequency") = (*instance_i)->getFrequency();
*demod->newChild("type") = (*instance_i)->getDemodulatorType();
//TODO: now we can only 7 bit strings properly, so convert back to Ascii...
// wxString intermediate((*instance_i)->getDemodulatorUserLabel());
demod->newChild("user_label")->element()->set((*instance_i)->getDemodulatorUserLabel());
*demod->newChild("squelch_level") = (*instance_i)->getSquelchLevel();
@@ -1700,11 +1698,7 @@ bool AppFrame::loadSession(std::string fileName) {
DataNode *demodUserLabel = demod->hasAnother("user_label") ? demod->getNext("user_label") : nullptr;
if (demodUserLabel) {
//toString() re-formats strings recognized as numerals, but at least it works for
//all kind of data.
//TODO: DataTree do not support 16 bit strings, so...
// std::string rawStr = demodUserLabel->element()->toString();
// user_label.assign(rawStr.begin(), rawStr.end());
demodUserLabel->element()->get(user_label);
}