From 04606c6835ab8e058805f22bca0d988bbec78423 Mon Sep 17 00:00:00 2001 From: DreamSourceLab Date: Thu, 31 Oct 2019 18:04:26 -0700 Subject: [PATCH] Fix default language issue for demo device --- DSView/pv/mainwindow.cpp | 2 +- DSView/res/virtual-demo1.dsc | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/DSView/pv/mainwindow.cpp b/DSView/pv/mainwindow.cpp index 80c1f8ec..947f6e02 100755 --- a/DSView/pv/mainwindow.cpp +++ b/DSView/pv/mainwindow.cpp @@ -877,7 +877,7 @@ bool MainWindow::load_session_json(QJsonDocument json, bool file_dev) // check language if (sessionObj.contains("Language")) { switchLanguage(sessionObj["Language"].toInt()); - } else { + } else if (sessionObj.contains("Operation Mode")) { bool language_matched = _session.get_device()->set_config(NULL, NULL, SR_CONF_OPERATION_MODE, g_variant_new_string(sessionObj["Operation Mode"].toString().toUtf8())); if (!language_matched) { diff --git a/DSView/res/virtual-demo1.dsc b/DSView/res/virtual-demo1.dsc index 18a8d82b..d21ee2d3 100755 --- a/DSView/res/virtual-demo1.dsc +++ b/DSView/res/virtual-demo1.dsc @@ -1,7 +1,6 @@ { "Device": "virtual-demo", "DeviceMode": 1, - "Language": 25, "Pattern mode": "Sine", "Sample count": "10000", "Sample rate": "100000000",