Implementation of refresh on file load and frame clearing for Graphing window. Clear old frames when loading new file. Updated version.

This commit is contained in:
Collin Kidder
2015-06-03 22:45:16 -04:00
parent 97f7db4e62
commit 74c19d2c89
4 changed files with 38 additions and 6 deletions
+5 -2
View File
@@ -557,8 +557,8 @@ void MainWindow::loadLogFile(QString filename)
{
QList<QByteArray> tokens = line.split(' ');
QList<QByteArray> timeToks = tokens[0].split(':');
timeStamp = (timeToks[0].toInt() * (1000 * 1000 * 60 * 60)) + (timeToks[1].toInt() * (1000 * 1000 * 60))
+ (timeToks[2].toInt() * (1000 * 1000)) + (timeToks[3].toInt() * 100);
timeStamp = (timeToks[0].toInt() * (1000ul * 1000ul * 60ul * 60ul)) + (timeToks[1].toInt() * (1000ul * 1000ul * 60ul))
+ (timeToks[2].toInt() * (1000ul * 1000ul)) + (timeToks[3].toInt() * 100ul);
thisFrame.timestamp = timeStamp;
thisFrame.ID = tokens[3].right(tokens[3].length() - 2).toInt(NULL, 16);
if (tokens[4] == "s") thisFrame.extended = false;
@@ -670,6 +670,9 @@ void MainWindow::handleLoadFile()
filename = dialog.selectedFiles()[0];
}
ui->canFramesView->scrollToTop();
model->clearFrames();
if (dialog.selectedNameFilter() == filters[0]) loadCRTDFile(filename);
if (dialog.selectedNameFilter() == filters[1]) loadNativeCSVFile(filename);
if (dialog.selectedNameFilter() == filters[2]) loadGenericCSVFile(filename);