From b610a404af096877b8c44d0a30d8e6065d47d320 Mon Sep 17 00:00:00 2001 From: miruka Date: Sun, 1 Sep 2019 00:27:42 -0400 Subject: [PATCH] Clear selection if event list loses focus --- TODO.md | 1 - src/qml/Base/HSelectableLabelContainer.qml | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index 970cdb2e..69d992c2 100644 --- a/TODO.md +++ b/TODO.md @@ -3,7 +3,6 @@ - Copy text with triple click, copy text + name + date with quadruple click - Copy to X11 selection - Make scroll wheel usable - - Clear selection when focusing composer - Refactoring - Banners diff --git a/src/qml/Base/HSelectableLabelContainer.qml b/src/qml/Base/HSelectableLabelContainer.qml index e8b2ed0d..1b2c5b3c 100644 --- a/src/qml/Base/HSelectableLabelContainer.qml +++ b/src/qml/Base/HSelectableLabelContainer.qml @@ -1,7 +1,10 @@ import QtQuick 2.12 import "../utils.js" as Utils -Item { +FocusScope { + onFocusChanged: if (! focus) clearSelection() + + signal deselectAll()