Index: src/app/qgsuniquevaluedialog.h =================================================================== --- src/app/qgsuniquevaluedialog.h (revision: 11107) +++ src/app/qgsuniquevaluedialog.h (copia de trabajo) @@ -46,6 +46,9 @@ QMap 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(); Index: src/app/qgssinglesymboldialog.h =================================================================== --- src/app/qgssinglesymboldialog.h (revision: 11107) +++ src/app/qgssinglesymboldialog.h (copia de trabajo) @@ -49,6 +49,9 @@ protected: QgsVectorLayer* mVectorLayer; + // 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(); Index: src/app/qgsgraduatedsymboldialog.h =================================================================== --- src/app/qgsgraduatedsymboldialog.h (revision: 11107) +++ src/app/qgsgraduatedsymboldialog.h (copia de trabajo) @@ -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(); Index: src/app/qgscontinuouscolordialog.h =================================================================== --- src/app/qgscontinuouscolordialog.h (revision: 11107) +++ src/app/qgscontinuouscolordialog.h (copia de trabajo) @@ -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(); Index: src/app/qgscontinuouscolordialog.cpp =================================================================== --- src/app/qgscontinuouscolordialog.cpp (revision: 11107) +++ src/app/qgscontinuouscolordialog.cpp (copia de trabajo) @@ -27,8 +27,8 @@ #include "qgslogger.h" #include +#include - 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(); + } +} Index: src/app/qgsgraduatedsymboldialog.cpp =================================================================== --- src/app/qgsgraduatedsymboldialog.cpp (revision: 11107) +++ src/app/qgsgraduatedsymboldialog.cpp (copia de trabajo) @@ -28,6 +28,8 @@ #include "qgsvectorlayer.h" #include "qgslogger.h" +#include + 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(); + } +} Index: src/app/qgsuniquevaluedialog.cpp =================================================================== --- src/app/qgsuniquevaluedialog.cpp (revision: 11107) +++ src/app/qgsuniquevaluedialog.cpp (copia de trabajo) @@ -27,6 +27,7 @@ #include "qgslogger.h" #include +#include QgsUniqueValueDialog::QgsUniqueValueDialog( QgsVectorLayer* vl ): QDialog(), mVectorLayer( vl ), sydialog( vl, true ) { @@ -456,3 +457,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(); + } +} Index: src/app/qgssinglesymboldialog.cpp =================================================================== --- src/app/qgssinglesymboldialog.cpp (revision: 11107) +++ src/app/qgssinglesymboldialog.cpp (copia de trabajo) @@ -31,6 +31,7 @@ #include #include #include +#include #define DO_NOT_USE_STR "" @@ -591,3 +592,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