Skip to content

Commit 44de3c6

Browse files
committed
heatmap: Update size on legend visibility change
1 parent d43a2f9 commit 44de3c6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Orange/widgets/visualize/utils/heatmap.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,6 +1249,15 @@ def boundingRect(self):
12491249
br = br.adjusted(-adjust, 0, adjust, 0)
12501250
return br
12511251

1252+
def showEvent(self, event):
1253+
super().showEvent(event)
1254+
# AxisItem resizes to 0 width/height when hidden, does not update when
1255+
# shown implicitly (i.e. a parent becomes visible).
1256+
# Use showLabel(False) which should update the size without actually
1257+
# changing anything else (no public interface to explicitly recalc
1258+
# fixed sizes).
1259+
self.showLabel(False)
1260+
12521261

12531262
class GradientLegendWidget(QGraphicsWidget):
12541263
def __init__(

0 commit comments

Comments
 (0)