Don't restore focus to unfocused widget

This commit is contained in:
Florian Bruhin 2014-06-19 13:34:23 +02:00
parent cd68d04067
commit 6f4b2e872b

View File

@ -412,7 +412,8 @@ class WebView(QWebView):
focused = QApplication.focusWidget()
self.setFocus()
QApplication.postEvent(self, evt)
focused.setFocus()
if focused is not None:
focused.setFocus()
@pyqtSlot()
def on_load_started(self):