From 69bcd973fa2f42dbb3f0b3f84d29335fcd4e0e3a Mon Sep 17 00:00:00 2001 From: Ales Erjavec Date: Mon, 16 Mar 2020 10:54:53 +0100 Subject: [PATCH] ContinuousPalettesModel: Disable 'category' items via `flags` Prevent selection in combo box via keyboard up/down arrow navigation. --- Orange/widgets/utils/itemmodels.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Orange/widgets/utils/itemmodels.py b/Orange/widgets/utils/itemmodels.py index cbf708b8073..af4a28b4978 100644 --- a/Orange/widgets/utils/itemmodels.py +++ b/Orange/widgets/utils/itemmodels.py @@ -617,7 +617,7 @@ def flags(self, index): if isinstance(item, ContinuousPalette): return Qt.ItemIsEnabled | Qt.ItemIsSelectable else: - return Qt.ItemIsEnabled + return Qt.NoItemFlags def indexOf(self, x): if isinstance(x, str):