Skip to content
Permalink
Browse files

disable project time use in wmst if it is invalid

  • Loading branch information
Samweli authored and nyalldawson committed Jun 15, 2020
1 parent 65bf008 commit 5cc0a224af436c064a8545dce65e502ec08eaec0
Showing with 23 additions and 2 deletions.
  1. +11 −0 src/gui/raster/qgsrasterlayerproperties.cpp
  2. +12 −2 src/ui/qgsrasterlayerpropertiesbase.ui
@@ -1374,6 +1374,17 @@ void QgsRasterLayerProperties::setSourceStaticTimeState()
mWmstOptionsLabel->setText( tr( "The static temporal options below are disabled because the layer "
"temporal properties are active, to enable them disable temporal properties "
"in the temporal tab. " ) );
QgsDateTimeRange range;
if ( QgsProject::instance()->timeSettings() )
range = QgsProject::instance()->timeSettings()->temporalRange();

if ( !range.begin().isValid() || !range.end().isValid() )
{
mProjectTemporalRange->setEnabled( false );
mProjectTemporalRangeLabel->setText( tr( "The option below is disabled because the project temporal range "
"is not valid, update the project temporal range in the project properties "
"with valid values in order to use it here." ) );
}

mWmstGroup->setChecked( uri.contains( QStringLiteral( "allowTemporalUpdates" ) ) &&
uri.value( QStringLiteral( "allowTemporalUpdates" ), true ).toBool() );
@@ -430,7 +430,7 @@ border-radius: 2px;</string>
<widget class="QgsDateTimeEdit" name="mReferenceDateTimeEdit">
<property name="dateTime">
<datetime>
<hour>13</hour>
<hour>12</hour>
<minute>20</minute>
<second>36</second>
<year>2020</year>
@@ -560,7 +560,7 @@ border-radius: 2px;</string>
<widget class="QgsDateTimeEdit" name="mStartStaticDateTimeEdit">
<property name="dateTime">
<datetime>
<hour>20</hour>
<hour>18</hour>
<minute>3</minute>
<second>57</second>
<year>2020</year>
@@ -595,6 +595,16 @@ border-radius: 2px;</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="mProjectTemporalRangeLabel">
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="mProjectTemporalRange">
<property name="text">

0 comments on commit 5cc0a22

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