Skip to content

Commit ca9b973

Browse files
committed
plotutils: Reset the palette in GraphicsView/PlotWidget constructors
1 parent 55ff045 commit ca9b973

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Orange/widgets/visualize/utils/plotutils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,8 @@ def __init__(self, *args, background=None, **kwargs):
619619
# Revert the pg.PlotWidget's modifications, use default
620620
# for QGraphicsView background role
621621
self.setBackgroundRole(QPalette.Base)
622+
# Reset changes to the palette (undo changes from pg.GraphicsView)
623+
self.setPalette(QPalette())
622624
self.__updateScenePalette()
623625

624626
def setScene(self, scene):
@@ -649,6 +651,8 @@ def __init__(self, *args, background=None, **kwargs):
649651
# Revert the pg.PlotWidget's modifications, use default
650652
# for QGraphicsView
651653
self.setBackgroundRole(QPalette.Base)
654+
# Reset changes to the palette (undo changes from pg.GraphicsView)
655+
self.setPalette(QPalette())
652656
self.__updateScenePalette()
653657

654658
def setScene(self, scene):

0 commit comments

Comments
 (0)