mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Block focus out event
The line edit wasn't being properly updated regarding its paint event. Turns out it was because it received a focus out event and then stopped refreshing the paint. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
eb2c78e953
commit
33a19328d8
2 changed files with 9 additions and 1 deletions
|
@ -396,7 +396,6 @@ int DiveLocationModel::rowCount(const QModelIndex& parent) const
|
|||
return dive_site_table.nr + 2;
|
||||
}
|
||||
|
||||
|
||||
bool DiveLocationModel::setData(const QModelIndex& index, const QVariant& value, int role)
|
||||
{
|
||||
if(!index.isValid())
|
||||
|
@ -465,6 +464,14 @@ bool DiveLocationLineEdit::eventFilter(QObject *o, QEvent *e)
|
|||
return false;
|
||||
}
|
||||
|
||||
void DiveLocationLineEdit::focusOutEvent(QFocusEvent* ev)
|
||||
{
|
||||
if (!view->isVisible()) {
|
||||
qDebug() << "Focusing Out";
|
||||
QLineEdit::focusOutEvent(ev);
|
||||
}
|
||||
}
|
||||
|
||||
void DiveLocationLineEdit::itemActivated(const QModelIndex& index)
|
||||
{
|
||||
qDebug() << "Activated" << index.data();
|
||||
|
|
|
@ -103,6 +103,7 @@ public:
|
|||
|
||||
protected:
|
||||
void keyPressEvent(QKeyEvent *ev);
|
||||
void focusOutEvent(QFocusEvent *ev);
|
||||
void showPopup();
|
||||
private:
|
||||
DiveLocationFilterProxyModel *proxy;
|
||||
|
|
Loading…
Reference in a new issue