From 2055bc6b263a9acfee49b4a5aab7d18d0e183f64 Mon Sep 17 00:00:00 2001 From: Peinthor Rene Date: Fri, 9 May 2014 17:51:55 +0200 Subject: [PATCH] plot: fix crash with selecting column out of range --- src/MainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 5109c293..638c50d0 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -1493,7 +1493,7 @@ void MainWindow::updatePlot(SqliteTableModel *model, bool update) int y = column; - graph->setPen(QPen(colors[y])); + graph->setPen(QPen(colors[ui->plotWidget->graphCount() - 1])); // prepare the data vectors for qcustomplot // possible improvement might be a QVector subclass that directly