diff --git a/src/gui/raster/qgsrasterlayertemporalpropertieswidget.cpp b/src/gui/raster/qgsrasterlayertemporalpropertieswidget.cpp index 948a9408c73a..d0b250206d76 100644 --- a/src/gui/raster/qgsrasterlayertemporalpropertieswidget.cpp +++ b/src/gui/raster/qgsrasterlayertemporalpropertieswidget.cpp @@ -25,6 +25,9 @@ #include "qgsexpressionbuilderdialog.h" #include "qgsexpressioncontextutils.h" #include "qgsunittypes.h" +#include "qgsapplication.h" +#include "qgsrasterrendererregistry.h" +#include "qgsrasterrenderer.h" #include #include @@ -155,6 +158,12 @@ void QgsRasterLayerTemporalPropertiesWidget::syncToLayer() break; } + if ( mLayer->renderer() && QgsApplication::rasterRendererRegistry()->rendererCapabilities( mLayer->renderer()->type() ) & Qgis::RasterRendererCapability::UsesMultipleBands ) + { + mWidgetFixedRangePerBand->hide(); + mFixedRangePerBandLabel->setText( tr( "This mode cannot be used with a multi-band renderer." ) ); + } + mBandComboBox->setLayer( mLayer ); mBandComboBox->setBand( temporalProperties->bandNumber() ); diff --git a/src/ui/raster/qgsrasterlayertemporalpropertieswidgetbase.ui b/src/ui/raster/qgsrasterlayertemporalpropertieswidgetbase.ui index 7e2855573185..1336292ed9b0 100644 --- a/src/ui/raster/qgsrasterlayertemporalpropertieswidgetbase.ui +++ b/src/ui/raster/qgsrasterlayertemporalpropertieswidgetbase.ui @@ -220,16 +220,6 @@ background: white;QgsCollapsibleGroupBoxBasic::title, QgsCollapsibleGroupBox::ti - - - - - 0 - 0 - - - - @@ -246,55 +236,76 @@ background: white;QgsCollapsibleGroupBoxBasic::title, QgsCollapsibleGroupBox::ti - - - - 0 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - ... - - - - :/images/themes/default/mIconExpression.svg:/images/themes/default/mIconExpression.svg - - - QToolButton::MenuButtonPopup - - - false - - - - - - - - - Qt::Vertical - - + + + - 40 - 20 + 0 + 33 - + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + + + + 0 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + ... + + + + :/images/themes/default/mIconExpression.svg:/images/themes/default/mIconExpression.svg + + + QToolButton::MenuButtonPopup + + + false + + + + + + + @@ -365,7 +376,7 @@ background: white;QgsCollapsibleGroupBoxBasic::title, QgsCollapsibleGroupBox::ti - +