[QGIS Commit] r14681 - in trunk/qgis/src: app ui
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Nov 15 05:45:27 EST 2010
Author: timlinux
Date: 2010-11-15 02:45:27 -0800 (Mon, 15 Nov 2010)
New Revision: 14681
Modified:
trunk/qgis/src/app/qgsrasterlayerproperties.cpp
trunk/qgis/src/app/qgsrasterlayerproperties.h
trunk/qgis/src/ui/qgsrasterlayerpropertiesbase.ui
Log:
Fix broken behaviour in raster props dialog for reset original null value
Modified: trunk/qgis/src/app/qgsrasterlayerproperties.cpp
===================================================================
--- trunk/qgis/src/app/qgsrasterlayerproperties.cpp 2010-11-15 10:45:18 UTC (rev 14680)
+++ trunk/qgis/src/app/qgsrasterlayerproperties.cpp 2010-11-15 10:45:27 UTC (rev 14681)
@@ -1177,20 +1177,6 @@
/*
* 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 @@
{
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();
+ }
+ }
+}
Modified: trunk/qgis/src/app/qgsrasterlayerproperties.h
===================================================================
--- trunk/qgis/src/app/qgsrasterlayerproperties.h 2010-11-15 10:45:18 UTC (rev 14680)
+++ trunk/qgis/src/app/qgsrasterlayerproperties.h 2010-11-15 10:45:27 UTC (rev 14681)
@@ -86,6 +86,8 @@
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 */
Modified: trunk/qgis/src/ui/qgsrasterlayerpropertiesbase.ui
===================================================================
--- trunk/qgis/src/ui/qgsrasterlayerpropertiesbase.ui 2010-11-15 10:45:18 UTC (rev 14680)
+++ trunk/qgis/src/ui/qgsrasterlayerpropertiesbase.ui 2010-11-15 10:45:27 UTC (rev 14681)
@@ -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 @@
</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>
More information about the QGIS-commit
mailing list