Skip to content

Commit

Permalink
signal should be emitted after daylight changed
Browse files Browse the repository at this point in the history
  • Loading branch information
janbar committed Oct 5, 2024
1 parent 420bc95 commit 3ea4fda
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/mapextras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,13 @@ void MapExtras::setDaylight(bool enable)
osmscout::DBThreadRef dbThread = osmscout::OSMScoutQt::GetInstance().GetDBThread();
if (dbThread->isInitialized())
dbThread->SetStyleFlag("daylight", enable)
.OnComplete([this, enable](bool ok){ if (ok) this->m_dayLigth = enable; });
.OnComplete([this, enable](bool ok){
if (ok)
{
this->m_dayLigth = enable;
emit this->dayLightChanged();
}
});
}

int MapExtras::addOverlay(const QString& type, int key)
Expand Down

0 comments on commit 3ea4fda

Please sign in to comment.