mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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
1 changed files with 3 additions and 1 deletions
|
@ -792,12 +792,14 @@ DiveCalculatedCeiling::DiveCalculatedCeiling() : is3mIncrement(false), gradientF
|
||||||
gradientFactor->setY(0);
|
gradientFactor->setY(0);
|
||||||
gradientFactor->setBrush(getColor(PRESSURE_TEXT));
|
gradientFactor->setBrush(getColor(PRESSURE_TEXT));
|
||||||
gradientFactor->setAlignment(Qt::AlignHCenter | Qt::AlignBottom);
|
gradientFactor->setAlignment(Qt::AlignHCenter | Qt::AlignBottom);
|
||||||
connect(MainWindow::instance()->information(), SIGNAL(dateTimeChanged()), this, SLOT(recalc()));
|
|
||||||
settingsChanged();
|
settingsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiveCalculatedCeiling::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
|
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.
|
// We don't have enougth data to calculate things, quit.
|
||||||
if (!shouldCalculateStuff(topLeft, bottomRight))
|
if (!shouldCalculateStuff(topLeft, bottomRight))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue