def paintEvent(self, event):
""" Paint scene and selected region"""
super(self.__class__, self).paintGL()
#Draw selected region
if self.selectionMode:
painter = QtGui.QPainter(self)
painter.setRenderHint(QtGui.QPainter.Antialiasing, True)
dxx = self.lastPos.x()-self.lastPosInit.x()
dyy = self.lastPos.y()- self.lastPosInit.y()
painter.drawRect(self.lastPosInit.x(), self.lastPosInit.y(), self.pose[0]+dxx, self.pose[1]+dyy)
# Paint vertexes inside selected volume box
#for vert in self.meshmodel.point_to_draw:
# painter.drawEllipse(vert[0] - 5, vert[1] - 5, 10, 10)
painter.end()
where the parent class is painting OpenGL stuff. When I load the configure file everything is fine:
My issue is after drawing the bounding box, the mesh colours change:
Can anyone give help me?