Skip to content
Permalink
Browse files

Apply patch from gcarillo to fix bug #1793

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11255 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Aug 3, 2009
1 parent 308abfe commit debbe549b76b3d2a5a6edc03e70adcbacc68232e
@@ -27,7 +27,7 @@
#include "qgslogger.h"

#include <QColorDialog>

#include <QKeyEvent>

QgsContinuousColorDialog::QgsContinuousColorDialog( QgsVectorLayer * layer )
: QDialog(), mVectorLayer( layer )
@@ -203,3 +203,12 @@ void QgsContinuousColorDialog::on_cb_polygonOutline_clicked()
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();
}
}
@@ -45,6 +45,9 @@ class QgsContinuousColorDialog: public QDialog, private Ui::QgsContinuousColorDi
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();
@@ -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::updateEntryIcon( QgsSymbol * thepSymbol,
;
}
}

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();
}
}
@@ -70,6 +70,9 @@ class QgsGraduatedSymbolDialog: public QDialog, private Ui::QgsGraduatedSymbolDi
/**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();
@@ -31,6 +31,7 @@
#include <QImage>
#include <QFileDialog>
#include <QListWidgetItem>
#include <QKeyEvent>

#define DO_NOT_USE_STR "<off>"

@@ -636,3 +637,11 @@ void QgsSingleSymbolDialog::fillStyleChanged( int theIndex )

}

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();
}
}
@@ -50,6 +50,9 @@ class QgsSingleSymbolDialog: public QDialog, private Ui::QgsSingleSymbolDialogBa
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();
@@ -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 @@ void QgsUniqueValueDialog::updateEntryIcon( QgsSymbol * thepSymbol,
//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();
}
}
@@ -46,6 +46,9 @@ class QgsUniqueValueDialog: public QDialog, private Ui::QgsUniqueValueDialogBase
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();

0 comments on commit debbe54

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