diff options
author | megabigbug <megabigbug@arrakis.(none)> | 2009-08-01 15:11:11 +0200 |
---|---|---|
committer | megabigbug <megabigbug@arrakis.(none)> | 2009-08-01 15:11:11 +0200 |
commit | 8baa424e3addad300fc22baf9636fc294efdcb56 (patch) | |
tree | 36c2b66b6399c3308e467e25dffd131c298b7f0b | |
parent | Fixing a bit enum OpenType names.. (diff) | |
download | rekonq-8baa424e3addad300fc22baf9636fc294efdcb56.tar.xz |
fix focus when right click bug
-rw-r--r-- | src/lineedit.cpp | 11 | ||||
-rw-r--r-- | src/lineedit.h | 1 | ||||
-rw-r--r-- | src/urlbar.cpp | 2 |
3 files changed, 1 insertions, 13 deletions
diff --git a/src/lineedit.cpp b/src/lineedit.cpp index fd43346d..270d1634 100644 --- a/src/lineedit.cpp +++ b/src/lineedit.cpp @@ -69,17 +69,6 @@ void LineEdit::focusInEvent(QFocusEvent *event) KLineEdit::focusInEvent(event); } - -void LineEdit::focusOutEvent(QFocusEvent *event) -{ - KLineEdit::focusOutEvent(event); - - // reset cursor state and deselect - setCursorPosition(0); - deselect(); -} - - void LineEdit::mouseDoubleClickEvent(QMouseEvent *) { selectAll(); diff --git a/src/lineedit.h b/src/lineedit.h index 4d989cf4..9fbf189b 100644 --- a/src/lineedit.h +++ b/src/lineedit.h @@ -43,7 +43,6 @@ protected: virtual void keyPressEvent(QKeyEvent*); virtual void contextMenuEvent(QContextMenuEvent*); virtual void focusInEvent(QFocusEvent*); - virtual void focusOutEvent(QFocusEvent*); virtual void mouseDoubleClickEvent(QMouseEvent *); }; diff --git a/src/urlbar.cpp b/src/urlbar.cpp index ba9773db..c2c28954 100644 --- a/src/urlbar.cpp +++ b/src/urlbar.cpp @@ -229,7 +229,7 @@ void UrlBar::paintEvent(QPaintEvent *event) void UrlBar::focusOutEvent(QFocusEvent *event) { // set back last loaded url in case user cleared it - setUrl(m_currentUrl); + if (!m_currentUrl.equals(KUrl(lineEdit()->text()))) setUrl(m_currentUrl); KHistoryComboBox::focusOutEvent(event); } |