From 5832d3db711a2df784d15e09c2fc702d456bb26c Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Wed, 17 Jun 2020 21:28:22 +0200 Subject: [PATCH] This seemed to fix the test on the local machine --- .travis.yml | 5 +++-- nw/gui/doceditor.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5200e76f..873ded23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,14 +8,15 @@ addons: apt: packages: - libenchant-dev + - python3-pyqt5 + - python3-pyqt5.qtsvg python: - "3.6" - "3.7" - "3.8" install: - pip install --upgrade pip - - pip install lxml - - pip install pyqt5==5.14.2 + - pip install -r requirements.txt # - pip install pytest-faulthandler - pip install PyVirtualDisplay - pip install pytest-xvfb diff --git a/nw/gui/doceditor.py b/nw/gui/doceditor.py index cc761202..cc72cf9a 100644 --- a/nw/gui/doceditor.py +++ b/nw/gui/doceditor.py @@ -593,7 +593,7 @@ class GuiDocEditor(QTextEdit): as it is triggered on every keypress when typing. """ self.hasSelection = self.textCursor().hasSelection() - if not self.hasFocus(): + if self.docSearch.searchBox.hasFocus(): # Block the event when the focus is on the search bar. return