Skip to content
Permalink
Browse files

remove mouserelesae event

because it's not needet. on focus it should clear.

cond / endcond
  • Loading branch information
signedav committed Nov 12, 2018
1 parent f44af04 commit f96078d0812ea56b6c622a3a1f41c32a71c561df
Showing with 3 additions and 16 deletions.
  1. +3 −11 src/gui/qgsfilterlineedit.cpp
  2. +0 −5 src/gui/qgsfilterlineedit.h
@@ -213,21 +213,13 @@ bool QgsFilterLineEdit::event( QEvent *event )
return QLineEdit::event( event );;
}

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

void QgsSpinBoxLineEdit::mouseReleaseEvent( QMouseEvent *e )
{
QLineEdit::mouseReleaseEvent( e );
if ( mWaitingForMouseRelease )
if ( isNull() )
{
mWaitingForMouseRelease = false;
clear();
}
}
/// @endcond
@@ -327,11 +327,6 @@ class SIP_SKIP QgsSpinBoxLineEdit : public QgsFilterLineEdit

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

private:
bool mWaitingForMouseRelease = false;

};
/// @endcond

0 comments on commit f96078d

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