[QGIS Commit] r11255 - trunk/qgis/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Aug 3 02:50:58 EDT 2009
Author: mhugent
Date: 2009-08-03 02:50:58 -0400 (Mon, 03 Aug 2009)
New Revision: 11255
Modified:
trunk/qgis/src/app/qgscontinuouscolordialog.cpp
trunk/qgis/src/app/qgscontinuouscolordialog.h
trunk/qgis/src/app/qgsgraduatedsymboldialog.cpp
trunk/qgis/src/app/qgsgraduatedsymboldialog.h
trunk/qgis/src/app/qgssinglesymboldialog.cpp
trunk/qgis/src/app/qgssinglesymboldialog.h
trunk/qgis/src/app/qgsuniquevaluedialog.cpp
trunk/qgis/src/app/qgsuniquevaluedialog.h
Log:
Apply patch from gcarillo to fix bug #1793
Modified: trunk/qgis/src/app/qgscontinuouscolordialog.cpp
===================================================================
--- trunk/qgis/src/app/qgscontinuouscolordialog.cpp 2009-08-02 22:03:28 UTC (rev 11254)
+++ trunk/qgis/src/app/qgscontinuouscolordialog.cpp 2009-08-03 06:50:58 UTC (rev 11255)
@@ -27,8 +27,8 @@
#include "qgslogger.h"
#include <QColorDialog>
+#include <QKeyEvent>
-
QgsContinuousColorDialog::QgsContinuousColorDialog( QgsVectorLayer * layer )
: QDialog(), mVectorLayer( layer )
{
@@ -203,3 +203,12 @@
else
outlinewidthspinbox->setEnabled( false );
}
+
+void QgsContinuousColorDialog::keyPressEvent( QKeyEvent * e )
+{
+ // Ignore the ESC key to avoid close the dialog without the properties window
+ if ( e->key() == Qt::Key_Escape )
+ {
+ e->ignore();
+ }
+}
Modified: trunk/qgis/src/app/qgscontinuouscolordialog.h
===================================================================
--- trunk/qgis/src/app/qgscontinuouscolordialog.h 2009-08-02 22:03:28 UTC (rev 11254)
+++ trunk/qgis/src/app/qgscontinuouscolordialog.h 2009-08-03 06:50:58 UTC (rev 11255)
@@ -45,6 +45,9 @@
protected:
QgsVectorLayer* mVectorLayer;
+ // Reimplements dialog keyPress event so we can ignore it
+ void keyPressEvent( QKeyEvent * event );
+
private:
/** Default constructor is private, do not use this */
QgsContinuousColorDialog();
Modified: trunk/qgis/src/app/qgsgraduatedsymboldialog.cpp
===================================================================
--- trunk/qgis/src/app/qgsgraduatedsymboldialog.cpp 2009-08-02 22:03:28 UTC (rev 11254)
+++ trunk/qgis/src/app/qgsgraduatedsymboldialog.cpp 2009-08-03 06:50:58 UTC (rev 11255)
@@ -28,6 +28,8 @@
#include "qgsvectorlayer.h"
#include "qgslogger.h"
+#include <QKeyEvent>
+
QgsGraduatedSymbolDialog::QgsGraduatedSymbolDialog( QgsVectorLayer * layer ): QDialog(), mVectorLayer( layer ), sydialog( layer )
{
setupUi( this );
@@ -598,3 +600,12 @@
;
}
}
+
+void QgsGraduatedSymbolDialog::keyPressEvent( QKeyEvent * e )
+{
+ // Ignore the ESC key to avoid close the dialog without the properties window
+ if ( e->key() == Qt::Key_Escape )
+ {
+ e->ignore();
+ }
+}
Modified: trunk/qgis/src/app/qgsgraduatedsymboldialog.h
===================================================================
--- trunk/qgis/src/app/qgsgraduatedsymboldialog.h 2009-08-02 22:03:28 UTC (rev 11254)
+++ trunk/qgis/src/app/qgsgraduatedsymboldialog.h 2009-08-03 06:50:58 UTC (rev 11255)
@@ -70,6 +70,9 @@
/**Gets the color value along a specified ramp**/
QColor getColorFromRamp( QString ramp, int step, int totalSteps );
+ // Reimplements dialog keyPress event so we can ignore it
+ void keyPressEvent( QKeyEvent * event );
+
protected slots:
/**Removes a class from the classification*/
void deleteCurrentClass();
Modified: trunk/qgis/src/app/qgssinglesymboldialog.cpp
===================================================================
--- trunk/qgis/src/app/qgssinglesymboldialog.cpp 2009-08-02 22:03:28 UTC (rev 11254)
+++ trunk/qgis/src/app/qgssinglesymboldialog.cpp 2009-08-03 06:50:58 UTC (rev 11255)
@@ -31,6 +31,7 @@
#include <QImage>
#include <QFileDialog>
#include <QListWidgetItem>
+#include <QKeyEvent>
#define DO_NOT_USE_STR "<off>"
@@ -636,3 +637,11 @@
}
+void QgsSingleSymbolDialog::keyPressEvent( QKeyEvent * e )
+{
+ // Ignore the ESC key to avoid close the dialog without the properties window
+ if ( e->key() == Qt::Key_Escape )
+ {
+ e->ignore();
+ }
+}
\ No newline at end of file
Modified: trunk/qgis/src/app/qgssinglesymboldialog.h
===================================================================
--- trunk/qgis/src/app/qgssinglesymboldialog.h 2009-08-02 22:03:28 UTC (rev 11254)
+++ trunk/qgis/src/app/qgssinglesymboldialog.h 2009-08-03 06:50:58 UTC (rev 11255)
@@ -50,6 +50,9 @@
QgsVectorLayer* mVectorLayer;
bool mDisabled;
+ // Reimplements dialog keyPress event so we can ignore it
+ void keyPressEvent( QKeyEvent * event );
+
public slots:
/* arrange the widgets on this dialog to reflect the current state of QgsSymbol */
void unset();
Modified: trunk/qgis/src/app/qgsuniquevaluedialog.cpp
===================================================================
--- trunk/qgis/src/app/qgsuniquevaluedialog.cpp 2009-08-02 22:03:28 UTC (rev 11254)
+++ trunk/qgis/src/app/qgsuniquevaluedialog.cpp 2009-08-03 06:50:58 UTC (rev 11255)
@@ -27,6 +27,7 @@
#include "qgslogger.h"
#include <QMessageBox>
+#include <QKeyEvent>
QgsUniqueValueDialog::QgsUniqueValueDialog( QgsVectorLayer* vl ): QDialog(), mVectorLayer( vl ), sydialog( vl, true )
{
@@ -458,3 +459,12 @@
//do nothing
}
}
+
+void QgsUniqueValueDialog::keyPressEvent( QKeyEvent * e )
+{
+ // Ignore the ESC key to avoid close the dialog without the properties window
+ if ( e->key() == Qt::Key_Escape )
+ {
+ e->ignore();
+ }
+}
Modified: trunk/qgis/src/app/qgsuniquevaluedialog.h
===================================================================
--- trunk/qgis/src/app/qgsuniquevaluedialog.h 2009-08-02 22:03:28 UTC (rev 11254)
+++ trunk/qgis/src/app/qgsuniquevaluedialog.h 2009-08-03 06:50:58 UTC (rev 11255)
@@ -46,6 +46,9 @@
QMap<QString, QgsSymbol*> mValues;
QgsSingleSymbolDialog sydialog;
+ // Reimplements dialog keyPress event so we can ignore it
+ void keyPressEvent( QKeyEvent * event );
+
protected slots:
/**Set new attribut for classification*/
void changeClassificationAttribute();
More information about the QGIS-commit
mailing list