Use the correct function for checking the count of plotted items

Now that the plot may contain graphs and curves, the plottableCount()
function must be used instead of graphCount() for checking whether the plot
has any plotted items.

This had the effect reported in issue #821 of breaking the enable check for
the fetch-all button.
This commit is contained in:
mgrojo
2018-01-08 23:30:55 +01:00
parent b08960f504
commit ce2b33ab6d
+1 -1
View File
@@ -326,7 +326,7 @@ void PlotDock::updatePlot(SqliteTableModel* model, BrowseDataTableSettings* sett
ui->plotWidget->replot();
// Warn user if not all data has been fetched and hint about the button for loading all the data
if (ui->plotWidget->graphCount() > 0 && model->canFetchMore()) {
if (ui->plotWidget->plottableCount() > 0 && model->canFetchMore()) {
ui->buttonLoadAllData->setEnabled(true);
ui->buttonLoadAllData->setStyleSheet("QToolButton {color: white; background-color: rgb(255, 102, 102)}");
ui->buttonLoadAllData->setToolTip(tr("Load all data and redraw plot.\n"