Skip to content

Commit 225184c

Browse files
committed
fix empty values in date time charts
1 parent e657a28 commit 225184c

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

gui/date_time_formats.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"dd/MM/yyyy hh:mm",
33
"yyyy/MM/dd hh:mm:ss",
44
"yyyy.MM.dd_hh:mm:ss",
5-
"yyyy/MM/dd hh_mm_ss"
5+
"yyyy/MM/dd hh_mm_ss",
6+
"yyyy.MM.dd hh:mm"
67
]

gui/davis_gui.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,14 @@ bool DavisGUI::checkDateTimeVariant(const QStringList& lines) {
673673
}
674674

675675
auto values_list = test.split(separator);
676+
//Clear empty values
677+
for(int ch =0;ch<values_list.size();++ch){
678+
if(values_list[ch].isEmpty()){
679+
values_list.removeAt(ch);
680+
}
681+
}
682+
683+
676684
if (values_list.size() < 2 || values_list.size() > 3) {
677685
continue;
678686
}
@@ -691,9 +699,9 @@ bool DavisGUI::checkDateTimeVariant(const QStringList& lines) {
691699
if (values.size() == 0)
692700
return false;
693701
qDebug() << "check sizes: " << lines.size() << values.size();
694-
if (lines.size() != values.size()) {
702+
/*if (lines.size() != values.size()) {
695703
return false;
696-
}
704+
}*/
697705
if (force.empty() == false) {
698706
dvs::showCloudOfPointsChartStr(dates.toStdString(), values, force);
699707
return true;

0 commit comments

Comments
 (0)