Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Move widget frames around for most logical ordering
  • Loading branch information
nyalldawson committed Mar 24, 2021
1 parent 1ec894d commit 52975e0
Show file tree
Hide file tree
Showing 2 changed files with 265 additions and 241 deletions.
16 changes: 16 additions & 0 deletions src/providers/wms/qgswmstsettingswidget.cpp
Expand Up @@ -180,11 +180,17 @@ void QgsWmstSettingsWidget::syncToLayer( QgsMapLayer *layer )
if ( mRasterLayer->temporalProperties()->isActive() )
{
mStaticWmstStackedWidget->setCurrentIndex( 0 );
// why do we hide this widget? well, the second page of the stacked widget is considerably higher
// then the first and we don't want to show a whole bunch of empty vertical space which Qt will give
// in order to accomodate the vertical height of the non-visible second page!
mStaticStackedWidgetFrame->hide();
}
else
{
mStaticWmstStackedWidget->setCurrentIndex( 1 );
mStaticStackedWidgetFrame->show();
}
mStaticWmstStackedWidget->updateGeometry();
}
}

Expand Down Expand Up @@ -258,9 +264,19 @@ void QgsWmstSettingsWidget::apply()
void QgsWmstSettingsWidget::temporalPropertiesChange()
{
if ( mRasterLayer->temporalProperties()->isActive() )
{
mStaticWmstStackedWidget->setCurrentIndex( 0 );
// why do we hide this widget? well, the second page of the stacked widget is considerably higher
// then the first and we don't want to show a whole bunch of empty vertical space which Qt will give
// in order to accomodate the vertical height of the non-visible second page!
mStaticStackedWidgetFrame->hide();
}
else
{
mStaticWmstStackedWidget->setCurrentIndex( 1 );
mStaticStackedWidgetFrame->show();
}
mStaticWmstStackedWidget->updateGeometry();
}


Expand Down

0 comments on commit 52975e0

Please sign in to comment.