mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
delete main window on close
...and set AllPlot's parent so that it gets deleted, too.
This commit is contained in:
@@ -170,7 +170,8 @@ max(double a, double b) { if (a > b) return a; else return b; }
|
||||
#define MILES_PER_KM 0.62137119
|
||||
#define FEET_PER_M 3.2808399
|
||||
|
||||
AllPlot::AllPlot():
|
||||
AllPlot::AllPlot(QWidget *parent):
|
||||
QwtPlot(parent),
|
||||
settings(NULL),
|
||||
unit(0),
|
||||
rideItem(NULL),
|
||||
|
||||
@@ -53,7 +53,7 @@ class AllPlot : public QwtPlot
|
||||
QVector<QwtPlotMarker*> d_mrk;
|
||||
QList <AllPlotZoneLabel *> zoneLabels;
|
||||
|
||||
AllPlot();
|
||||
AllPlot(QWidget *parent);
|
||||
|
||||
int smoothing() const { return smooth; }
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ MainWindow::MainWindow(const QDir &home) :
|
||||
smoothSlider->maximum(),
|
||||
smoothLineEdit));
|
||||
smoothLayout->addWidget(smoothSlider);
|
||||
allPlot = new AllPlot();
|
||||
allPlot = new AllPlot(this);
|
||||
smoothSlider->setValue(allPlot->smoothing());
|
||||
smoothLineEdit->setText(QString("%1").arg(allPlot->smoothing()));
|
||||
|
||||
@@ -618,6 +618,8 @@ MainWindow::MainWindow(const QDir &home) :
|
||||
treeWidget->setCurrentItem(allRides->child(0));
|
||||
}
|
||||
}
|
||||
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user