Skip to content
Permalink
Browse files

Only loop and connect signals for layers being added

  • Loading branch information
nirvn authored and nyalldawson committed May 14, 2020
1 parent 31a6467 commit 84c4d8d25197369b8065318cac57389405609d99
Showing with 2 additions and 3 deletions.
  1. +1 −2 src/gui/qgstemporalcontrollerwidget.cpp
  2. +1 −1 src/gui/qgstemporalcontrollerwidget.h
@@ -167,11 +167,10 @@ void QgsTemporalControllerWidget::setWidgetStateFromProject()
mNavigationObject->setTemporalRangeCumulative( QgsProject::instance()->timeSettings()->isTemporalRangeCumulative() );
}

void QgsTemporalControllerWidget::onLayersAdded()
void QgsTemporalControllerWidget::onLayersAdded( const QList<QgsMapLayer *> &layers )
{
if ( !mHasTemporalLayersLoaded )
{
QVector<QgsMapLayer *> layers = QgsProject::instance()->layers<QgsMapLayer *>();
for ( QgsMapLayer *layer : layers )
{
if ( layer->temporalProperties() )
@@ -110,7 +110,7 @@ class GUI_EXPORT QgsTemporalControllerWidget : public QgsPanelWidget, private Ui

void setWidgetStateFromProject();

void onLayersAdded();
void onLayersAdded( const QList<QgsMapLayer *> &layers );
void onProjectCleared();

void startEndDateTime_changed();

0 comments on commit 84c4d8d

Please sign in to comment.
You can’t perform that action at this time.