+ if self.HasFocus():
+ self._propShape.SetBrush(SELECT_BRUSH)
+ else:
+ self._propShape.SetBrush(INACTIVE_SELECT_BRUSH)
+ if (self._propShape._textColourName in ["BLACK", "WHITE"]): # Would use GetTextColour() but it is broken
+ self._propShape.SetTextColour("WHITE", 0)
+ self._propShape.Draw(dc)
+
+ dc.EndDrawing()
+
+
+ def FocusColorPropertyShape(self, gotFocus=False):
+ # no need to change highlight if no PropertyService is running
+ propertyService = wx.GetApp().GetService(PropertyService.PropertyService)
+ if not propertyService:
+ return
+
+ if not self._propShape:
+ return
+
+ dc = wx.ClientDC(self._canvas)
+ self._canvas.PrepareDC(dc)
+ dc.BeginDrawing()
+
+ # draw deactivated selection
+ if self._propShape and self._propShape in self._diagram.GetShapeList():
+ if gotFocus:
+ self._propShape.SetBrush(SELECT_BRUSH)
+ else:
+ self._propShape.SetBrush(INACTIVE_SELECT_BRUSH)