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()
父类正在绘制OpenGL的东西。当我加载配置文件时,一切都很好:
我的问题是在绘制边界框后,网格颜色发生变化:
任何人都可以帮助我吗?