Skip to content

Commit

Permalink
remove mouserelesae event
Browse files Browse the repository at this point in the history
because it's not needet. on focus it should clear.

cond / endcond
  • Loading branch information
signedav committed Nov 13, 2018
1 parent f44af04 commit f96078d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
14 changes: 3 additions & 11 deletions src/gui/qgsfilterlineedit.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -213,21 +213,13 @@ bool QgsFilterLineEdit::event( QEvent *event )
return QLineEdit::event( event );; return QLineEdit::event( event );;
} }


/// @cond PRIVATE
void QgsSpinBoxLineEdit::focusInEvent( QFocusEvent *e ) void QgsSpinBoxLineEdit::focusInEvent( QFocusEvent *e )
{ {
QLineEdit::focusInEvent( e ); QLineEdit::focusInEvent( e );
if ( e->reason() == Qt::MouseFocusReason && ( isNull() ) ) if ( isNull() )
{
mWaitingForMouseRelease = true;
}
}

void QgsSpinBoxLineEdit::mouseReleaseEvent( QMouseEvent *e )
{
QLineEdit::mouseReleaseEvent( e );
if ( mWaitingForMouseRelease )
{ {
mWaitingForMouseRelease = false;
clear(); clear();
} }
} }
/// @endcond
5 changes: 0 additions & 5 deletions src/gui/qgsfilterlineedit.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -327,11 +327,6 @@ class SIP_SKIP QgsSpinBoxLineEdit : public QgsFilterLineEdit


protected: protected:
void focusInEvent( QFocusEvent *e ) override; void focusInEvent( QFocusEvent *e ) override;
void mouseReleaseEvent( QMouseEvent *e ) override;

private:
bool mWaitingForMouseRelease = false;

}; };
/// @endcond /// @endcond


Expand Down

0 comments on commit f96078d

Please sign in to comment.