mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 08:38:45 +00:00
fix 3d plot performance issues
Scrolling up and down the ride files is painfully slow when 3d is compiled in. This patch uses a setActive mechanism in the same fashion as the pfpv and performance manager tabs. Additionally, a recent patch to support user preferences for units added a settings lookup that was called for every point. This is also fixed. fixes #16
This commit is contained in:
committed by
Sean Rhea
parent
195937f186
commit
4d1783276c
@@ -46,7 +46,7 @@ ModelWindow::addStandardChannels(QComboBox *box)
|
||||
//box->addItem(tr("Longitude"), MODEL_LONG); //XXX weird values make the plot ugly
|
||||
}
|
||||
|
||||
ModelWindow::ModelWindow(MainWindow *parent, const QDir &home) : QWidget(parent), home(home), main(parent)
|
||||
ModelWindow::ModelWindow(MainWindow *parent, const QDir &home) : QWidget(parent), home(home), main(parent), active(false)
|
||||
{
|
||||
// Layouts
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout;
|
||||
@@ -182,11 +182,17 @@ ModelWindow::ModelWindow(MainWindow *parent, const QDir &home) : QWidget(parent)
|
||||
connect(zpane, SIGNAL(valueChanged(int)), this, SLOT(setZPane(int)));
|
||||
}
|
||||
|
||||
void
|
||||
ModelWindow::setActive(bool active)
|
||||
{
|
||||
this->active = active;
|
||||
if (active) setData(true);
|
||||
}
|
||||
void
|
||||
ModelWindow::rideSelected()
|
||||
{
|
||||
ride = main->rideItem();
|
||||
setData(true);
|
||||
if (active) setData(true);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user