PythonChart Toggle Web/Qt

Fixes #3375
This commit is contained in:
Mark Liversedge
2020-03-20 08:42:13 +00:00
parent fc02b8a38b
commit 3fab386fb2
2 changed files with 3 additions and 2 deletions

View File

@@ -290,7 +290,6 @@ PythonChart::PythonChart(Context *context, bool ridesummary) : GcChartWindow(con
// settings
QVBoxLayout *clv = new QVBoxLayout(c);
web = new QCheckBox(tr("Web charting"), this);
web->setChecked(true);
clv->addWidget(web);
clv->addStretch();
@@ -411,6 +410,7 @@ PythonChart::PythonChart(Context *context, bool ridesummary) : GcChartWindow(con
showCon = NULL;
leftsplitter = NULL;
}
web->setChecked(true);
}
@@ -425,6 +425,7 @@ PythonChart::setWeb(bool x)
if (plot) {
renderlayout->removeWidget(plot);
delete plot; // deletes associated chart too
plot = NULL;
}
// setup the canvas

View File

@@ -118,7 +118,7 @@ class PythonChart : public GcChartWindow, public PythonHost {
void emitUrl(QUrl x) { emit setUrl(x); }
bool asWeb() const { return (web ? web->isChecked() : true); }
bool asWeb() const { return web->isChecked(); }
void setWeb(bool);
bool showConsole() const { return (showCon ? showCon->isChecked() : true); }