Skip to content
Permalink
Browse files

Move widget frames around for most logical ordering

  • Loading branch information
nyalldawson committed Mar 24, 2021
1 parent 1ec894d commit 52975e0aa460cbb50e96e92a234a7d4228be5e17
Showing with 265 additions and 241 deletions.
  1. +16 −0 src/providers/wms/qgswmstsettingswidget.cpp
  2. +249 −241 src/ui/qgswmstsettingswidgetbase.ui
@@ -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();
}
}

@@ -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();
}


0 comments on commit 52975e0

Please sign in to comment.