Skip to content

Commit

Permalink
handle EnableChange event in QgsFilterLineEdit
Browse files Browse the repository at this point in the history
  • Loading branch information
signedav committed Oct 25, 2018
1 parent a4bb905 commit 9768fdd
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 14 deletions.
3 changes: 0 additions & 3 deletions python/gui/auto_generated/qgsfeaturelistcombobox.sip.in
Expand Up @@ -125,9 +125,6 @@ The index of the currently selected item.
virtual void keyPressEvent( QKeyEvent *event );


virtual bool event( QEvent *event );


signals:

void modelUpdated();
Expand Down
8 changes: 0 additions & 8 deletions src/gui/qgsfeaturelistcombobox.cpp
Expand Up @@ -203,14 +203,6 @@ void QgsFeatureListComboBox::keyPressEvent( QKeyEvent *event )
QComboBox::keyReleaseEvent( event );
}

bool QgsFeatureListComboBox::event( QEvent *event )
{
if ( event->type() == QEvent::EnabledChange )
mLineEdit->setShowClearButton( true );

return QComboBox::event( event );
}

bool QgsFeatureListComboBox::allowNull() const
{
return mModel->allowNull();
Expand Down
2 changes: 0 additions & 2 deletions src/gui/qgsfeaturelistcombobox.h
Expand Up @@ -147,8 +147,6 @@ class GUI_EXPORT QgsFeatureListComboBox : public QComboBox

void keyPressEvent( QKeyEvent *event ) override;

bool event( QEvent *event ) override;

signals:

/**
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsfilterlineedit.cpp
Expand Up @@ -208,7 +208,7 @@ bool QgsFilterLineEdit::shouldShowClear() const

bool QgsFilterLineEdit::event( QEvent *event )
{
if ( event->type() == QEvent::ReadOnlyChange )
if ( event->type() == QEvent::ReadOnlyChange || event->type() == QEvent::EnabledChange )
updateClearIcon();

return QLineEdit::event( event );;
Expand Down

0 comments on commit 9768fdd

Please sign in to comment.