diff --git a/tropical/qt/eventdrawer.py b/tropical/qt/eventdrawer.py index 07ba449..331139f 100644 --- a/tropical/qt/eventdrawer.py +++ b/tropical/qt/eventdrawer.py @@ -23,6 +23,7 @@ class EvtDrawerScene(QGraphicsScene): super().__init__(None) self.calState=calState self.env=env + self.eventsRect=list() def drawForeground(self, painter, rect): origXF, origYF, widthF, heightF = rect.getRect() @@ -46,7 +47,8 @@ class EvtDrawerScene(QGraphicsScene): eventHeight=80 colorWidth=20 for e in self.env.listEventsOn(2024,10,1): - painter.drawRect(x+po,y+po,width-po*2,eventHeight-po*2) + r=QRect(x+po,y+po,width-po*2,eventHeight-po*2) + painter.drawRect(r) class EvtDrawer():