Plot: Load all data before drawing a plot

Load all table data first, before drawing a plot. Otherwise the plot
might be incomplete because not all data is loaded yet due to partial
table loading.

See issue #499.
This commit is contained in:
Martin Kleusberg
2016-01-27 20:50:39 +01:00
parent ef8fbd83c8
commit 6784a6a854

View File

@@ -1682,6 +1682,10 @@ void MainWindow::updatePlot(SqliteTableModel *model, bool update)
if(model)
{
// Make sure all data is loaded before trying to plot anything
while(model->canFetchMore())
model->fetchMore();
for(int i = 0; i < model->columnCount(); ++i)
{
QVariant::Type columntype = guessdatatype(model, i);