Don't refresh R and Python charts on intervalsChanged

To avoid the script running twice on ride selection and
interval edition/deletion.
Caveat is when intervals are created via find intervals
the script is not notified until interval or ride selection changes.
This commit is contained in:
Ale Martinez
2020-11-09 21:07:39 -03:00
parent 4273480bf4
commit cec7c4dd52
2 changed files with 3 additions and 5 deletions

View File

@@ -362,14 +362,13 @@ PythonChart::PythonChart(Context *context, bool ridesummary) : GcChartWindow(con
connect(this, SIGNAL(setUrl(QUrl)), this, SLOT(webpage(QUrl)));
if (ridesummary) {
connect(this, SIGNAL(rideItemChanged(RideItem*)), this, SLOT(runScript()));
// refresh when comparing
connect(context, SIGNAL(compareIntervalsStateChanged(bool)), this, SLOT(runScript()));
connect(context, SIGNAL(compareIntervalsChanged()), this, SLOT(runScript()));
// refresh when ride or intervals changed / selected
connect(this, SIGNAL(rideItemChanged(RideItem*)), this, SLOT(runScript()));
connect(context, SIGNAL(intervalsChanged()), this, SLOT(runScript()));
// refresh when intervals are selected
connect(context, SIGNAL(intervalSelected()), this, SLOT(runScript()));
} else {

View File

@@ -369,8 +369,7 @@ RChart::RChart(Context *context, bool ridesummary) : GcChartWindow(context), con
connect(context, SIGNAL(compareIntervalsStateChanged(bool)), this, SLOT(runScript()));
connect(context, SIGNAL(compareIntervalsChanged()), this, SLOT(runScript()));
// refresh when intervals changed / selected
connect(context, SIGNAL(intervalsChanged()), this, SLOT(runScript()));
// refresh when intervals are selected
connect(context, SIGNAL(intervalSelected()), this, SLOT(runScript()));
} else {