Skip to content

Commit f96078d

Browse files
committedNov 13, 2018
remove mouserelesae event
because it's not needet. on focus it should clear. cond / endcond
1 parent f44af04 commit f96078d

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed
 

‎src/gui/qgsfilterlineedit.cpp

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -213,21 +213,13 @@ bool QgsFilterLineEdit::event( QEvent *event )
213213
return QLineEdit::event( event );;
214214
}
215215

216+
/// @cond PRIVATE
216217
void QgsSpinBoxLineEdit::focusInEvent( QFocusEvent *e )
217218
{
218219
QLineEdit::focusInEvent( e );
219-
if ( e->reason() == Qt::MouseFocusReason && ( isNull() ) )
220-
{
221-
mWaitingForMouseRelease = true;
222-
}
223-
}
224-
225-
void QgsSpinBoxLineEdit::mouseReleaseEvent( QMouseEvent *e )
226-
{
227-
QLineEdit::mouseReleaseEvent( e );
228-
if ( mWaitingForMouseRelease )
220+
if ( isNull() )
229221
{
230-
mWaitingForMouseRelease = false;
231222
clear();
232223
}
233224
}
225+
/// @endcond

‎src/gui/qgsfilterlineedit.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,6 @@ class SIP_SKIP QgsSpinBoxLineEdit : public QgsFilterLineEdit
327327

328328
protected:
329329
void focusInEvent( QFocusEvent *e ) override;
330-
void mouseReleaseEvent( QMouseEvent *e ) override;
331-
332-
private:
333-
bool mWaitingForMouseRelease = false;
334-
335330
};
336331
/// @endcond
337332

0 commit comments

Comments
 (0)
Please sign in to comment.