Fix broken connection
The old way of creating the mainwindow made things a bit dependent of the order of initialization, and we don't assume that anymore. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9b547e6c71
commit
9b62d36757
@ -792,12 +792,14 @@ DiveCalculatedCeiling::DiveCalculatedCeiling() : is3mIncrement(false), gradientF
|
||||
gradientFactor->setY(0);
|
||||
gradientFactor->setBrush(getColor(PRESSURE_TEXT));
|
||||
gradientFactor->setAlignment(Qt::AlignHCenter | Qt::AlignBottom);
|
||||
connect(MainWindow::instance()->information(), SIGNAL(dateTimeChanged()), this, SLOT(recalc()));
|
||||
settingsChanged();
|
||||
}
|
||||
|
||||
void DiveCalculatedCeiling::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
|
||||
{
|
||||
if (MainWindow::instance()->information())
|
||||
connect(MainWindow::instance()->information(), SIGNAL(dateTimeChanged()), this, SLOT(recalc()), Qt::UniqueConnection);
|
||||
|
||||
// We don't have enougth data to calculate things, quit.
|
||||
if (!shouldCalculateStuff(topLeft, bottomRight))
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user