mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-02 23:20:20 +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;
|
return dive_site_table.nr + 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool DiveLocationModel::setData(const QModelIndex& index, const QVariant& value, int role)
|
bool DiveLocationModel::setData(const QModelIndex& index, const QVariant& value, int role)
|
||||||
{
|
{
|
||||||
if(!index.isValid())
|
if(!index.isValid())
|
||||||
|
@ -465,6 +464,14 @@ bool DiveLocationLineEdit::eventFilter(QObject *o, QEvent *e)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DiveLocationLineEdit::focusOutEvent(QFocusEvent* ev)
|
||||||
|
{
|
||||||
|
if (!view->isVisible()) {
|
||||||
|
qDebug() << "Focusing Out";
|
||||||
|
QLineEdit::focusOutEvent(ev);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void DiveLocationLineEdit::itemActivated(const QModelIndex& index)
|
void DiveLocationLineEdit::itemActivated(const QModelIndex& index)
|
||||||
{
|
{
|
||||||
qDebug() << "Activated" << index.data();
|
qDebug() << "Activated" << index.data();
|
||||||
|
|
|
@ -103,6 +103,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void keyPressEvent(QKeyEvent *ev);
|
void keyPressEvent(QKeyEvent *ev);
|
||||||
|
void focusOutEvent(QFocusEvent *ev);
|
||||||
void showPopup();
|
void showPopup();
|
||||||
private:
|
private:
|
||||||
DiveLocationFilterProxyModel *proxy;
|
DiveLocationFilterProxyModel *proxy;
|
||||||
|
|
Loading…
Reference in a new issue