DRASTIC speed up of file loading by not refreshing until the file load is done. Very fast now.

This commit is contained in:
Collin Kidder
2015-04-27 18:39:48 -04:00
parent 1deff8af58
commit 6a646cb31b
3 changed files with 9 additions and 1 deletions
+7 -1
View File
@@ -98,8 +98,14 @@ QVariant CANFrameModel::headerData(int section, Qt::Orientation orientation,
void CANFrameModel::addFrame(CANFrame &frame)
{
beginInsertRows(QModelIndex(), frames.count() + 1, frames.count() + 1);
//beginInsertRows(QModelIndex(), frames.count() + 1, frames.count() + 1);
frames.append(frame);
//endInsertRows();
}
void CANFrameModel::sendRefresh()
{
beginInsertRows(QModelIndex(), 0, frames.count());
endInsertRows();
}
+1
View File
@@ -19,6 +19,7 @@ public:
int CANFrameModel::columnCount(const QModelIndex &) const;
void addFrame(CANFrame &frame);
void sendRefresh();
void clearFrames();
+1
View File
@@ -74,6 +74,7 @@ void MainWindow::loadNativeCSVFile(QString filename)
}
}
inFile->close();
model->sendRefresh();
}