File: pyqtgraph-0.13.patch

package info (click to toggle)
taurus-pyqtgraph 0.5.9-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 536 kB
  • sloc: python: 4,281; makefile: 81
file content (29 lines) | stat: -rw-r--r-- 1,437 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description: Fix compatibility with pyqtgraph 0.13 
 Commit 1cb4d077 of pyqtgraph fixed ViewBoxMenu which now correctly
 stores widgetGroups instead of wrongly storing directly widgets.
 This breaks the hack which was giving room for datetime editors of time
 axis range.
 Fix it by extracting this widget in a slightly different way (may turn out
 to be a fragile code).
Origin: upstream, https://gitlab.com/taurus-org/taurus_pyqtgraph/-/commit/fb2e377f5d
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030906
Reviewed-by: Étienne Mollier <emollier@debian.org>
Last-Update: 2023-02-27
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- taurus-pyqtgraph.orig/taurus_pyqtgraph/dateaxisitem.py
+++ taurus-pyqtgraph/taurus_pyqtgraph/dateaxisitem.py
@@ -258,8 +258,11 @@
         ly.addWidget(self._minDTE, *xmin_pos)
         ly.addWidget(self._maxDTE, *xmax_pos)
 
-        # give room to the datetime editors in the axis menu widget
-        w = viewBox.menu.widgetGroups[axis]
+        # give room to the datetime editors in the axis menu widget;
+        # probably, could be solved in a more elegant way using
+        # viewBox.menu.widgetGroups[axis] and its minText and maxText
+        # widgets
+        w = viewBox.menu.axes[axis].actions()[0].defaultWidget()
         w.setMaximumWidth(max(450, w.maximumWidth()))
 
         # Update the datetime editors and connect them to view changes