mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Fix broken behaviour in raster props dialog for reset original null value
git-svn-id: http://svn.osgeo.org/qgis/trunk@14681 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
5bc7b47ae7
commit
5383075a9b
@ -1177,20 +1177,6 @@ void QgsRasterLayerProperties::apply()
|
||||
/*
|
||||
* Transparent Pixel Tab
|
||||
*/
|
||||
//If reset NoDataValue is checked do this first, will ignore what ever is in the LineEdit
|
||||
if ( mRasterLayerIsGdal && chkboxResetNoDataValue->isChecked() )
|
||||
{
|
||||
mRasterLayer->resetNoDataValue();
|
||||
if ( mRasterLayer->isNoDataValueValid() )
|
||||
{
|
||||
leNoDataValue->insert( QString::number( mRasterLayer->noDataValue(), 'f' ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
leNoDataValue->clear();
|
||||
}
|
||||
chkboxResetNoDataValue->setChecked( false );
|
||||
}
|
||||
|
||||
//set NoDataValue
|
||||
bool myDoubleOk = false;
|
||||
@ -3030,3 +3016,20 @@ void QgsPixelSelectorTool::canvasReleaseEvent( QMouseEvent* theMouseEvent )
|
||||
{
|
||||
emit pixelSelected( theMouseEvent->x( ), theMouseEvent->y( ) );
|
||||
}
|
||||
|
||||
void QgsRasterLayerProperties::on_btnResetNull_clicked( )
|
||||
{
|
||||
//If reset NoDataValue is checked do this first, will ignore what ever is in the LineEdit
|
||||
if ( mRasterLayerIsGdal )
|
||||
{
|
||||
mRasterLayer->resetNoDataValue();
|
||||
if ( mRasterLayer->isNoDataValueValid() )
|
||||
{
|
||||
leNoDataValue->setText( QString::number( mRasterLayer->noDataValue(), 'f' ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
leNoDataValue->clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -86,6 +86,8 @@ class QgsRasterLayerProperties : public QDialog, private Ui::QgsRasterLayerPrope
|
||||
void on_rbtnThreeBandMinMax_toggled( bool );
|
||||
/** \brief slot executed when the three band standard deviation radio button is pressed. */
|
||||
void on_rbtnThreeBandStdDev_toggled( bool );
|
||||
/** \brief slot executed when the reset null value to file default icon is selected */
|
||||
void on_btnResetNull_clicked( );
|
||||
|
||||
void pixelSelected( int x, int y );
|
||||
/** \brief this slot clears min max values from gui */
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>755</width>
|
||||
<height>654</height>
|
||||
<height>667</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -28,7 +28,7 @@
|
||||
<item row="0" column="0" colspan="4">
|
||||
<widget class="QTabWidget" name="tabBar">
|
||||
<property name="currentIndex">
|
||||
<number>4</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
@ -36,7 +36,7 @@
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<widget class="QWidget" name="tabPageSymbology" native="true">
|
||||
<widget class="QWidget" name="tabPageSymbology">
|
||||
<attribute name="icon">
|
||||
<iconset resource="../../images/images.qrc">
|
||||
<normaloff>:/images/themes/default/propertyicons/symbology.png</normaloff>:/images/themes/default/propertyicons/symbology.png</iconset>
|
||||
@ -921,7 +921,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabBarPage2" native="true">
|
||||
<widget class="QWidget" name="tabBarPage2">
|
||||
<attribute name="icon">
|
||||
<iconset resource="../../images/images.qrc">
|
||||
<normaloff>:/images/themes/default/propertyicons/transparency.png</normaloff>:/images/themes/default/propertyicons/transparency.png</iconset>
|
||||
@ -1014,25 +1014,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QGroupBox" name="gboxNoDataValue">
|
||||
<property name="title">
|
||||
<string>No data value</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="leNoDataValue"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkboxResetNoDataValue">
|
||||
<property name="text">
|
||||
<string>Reset no data value</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="gboxCustomTransparency">
|
||||
<property name="title">
|
||||
@ -1207,9 +1188,35 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QGroupBox" name="gboxNoDataValue">
|
||||
<property name="title">
|
||||
<string>No data value</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLineEdit" name="leNoDataValue"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QToolButton" name="btnResetNull">
|
||||
<property name="toolTip">
|
||||
<string>Reset to file defined null</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../images/images.qrc">
|
||||
<normaloff>:/images/themes/default/mActionDraw.png</normaloff>:/images/themes/default/mActionDraw.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabPageColormap" native="true">
|
||||
<widget class="QWidget" name="tabPageColormap">
|
||||
<attribute name="icon">
|
||||
<iconset resource="../../images/images.qrc">
|
||||
<normaloff>:/images/themes/default/propertyicons/colormap.png</normaloff>:/images/themes/default/propertyicons/colormap.png</iconset>
|
||||
@ -1418,7 +1425,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabBarPage4" native="true">
|
||||
<widget class="QWidget" name="tabBarPage4">
|
||||
<attribute name="icon">
|
||||
<iconset resource="../../images/images.qrc">
|
||||
<normaloff>:/images/themes/default/propertyicons/general.png</normaloff>:/images/themes/default/propertyicons/general.png</iconset>
|
||||
@ -1709,7 +1716,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabPageMetadata" native="true">
|
||||
<widget class="QWidget" name="tabPageMetadata">
|
||||
<attribute name="icon">
|
||||
<iconset resource="../../images/images.qrc">
|
||||
<normaloff>:/images/themes/default/propertyicons/metadata.png</normaloff>:/images/themes/default/propertyicons/metadata.png</iconset>
|
||||
@ -1726,7 +1733,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabPagePyramids" native="true">
|
||||
<widget class="QWidget" name="tabPagePyramids">
|
||||
<attribute name="icon">
|
||||
<iconset resource="../../images/images.qrc">
|
||||
<normaloff>:/images/themes/default/propertyicons/pyramids.png</normaloff>:/images/themes/default/propertyicons/pyramids.png</iconset>
|
||||
@ -1764,19 +1771,20 @@
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">
|
||||
</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;">
|
||||
<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
|
||||
<tr>
|
||||
<td style="border: none;">
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:11pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;"></p></td></tr></table></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
@ -1844,7 +1852,7 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabPageHistogram" native="true">
|
||||
<widget class="QWidget" name="tabPageHistogram">
|
||||
<attribute name="icon">
|
||||
<iconset resource="../../images/images.qrc">
|
||||
<normaloff>:/images/themes/default/propertyicons/histogram.png</normaloff>:/images/themes/default/propertyicons/histogram.png</iconset>
|
||||
|
Loading…
x
Reference in New Issue
Block a user