From ac039c1b6dcd2bf27e0bba7a9c4db0a3efacf20f Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Wed, 12 Jul 2023 18:31:29 +0200 Subject: [PATCH] higher zValues for borders of RegionItem to move overlapping RegionItems --- src/gui_qt/lib/pg_objects.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui_qt/lib/pg_objects.py b/src/gui_qt/lib/pg_objects.py index fba116b..f81e28a 100644 --- a/src/gui_qt/lib/pg_objects.py +++ b/src/gui_qt/lib/pg_objects.py @@ -383,6 +383,10 @@ class RegionItem(LinearRegionItem): if not hasattr(self, '_bounds') and hasattr(self, '_boundingRectCache'): self._bounds = self._boundingRectCache + for l in self.lines: + # higher z for borderlines improves chances that you can move it when multiple regions overlap + l.setZValue(self.zValue() + 1) + def setLogMode(self, xmode, _): if self.logmode == xmode: return