editors/Viewer.py
changeset 1647 13d15a1ae899
parent 1644 976ce8c6195d
child 1660 ccf2bcf66c70
equal deleted inserted replaced
1646:2d1fb99065e8 1647:13d15a1ae899
  3658         if not printing:
  3658         if not printing:
  3659             if self.Debug:
  3659             if self.Debug:
  3660                 scalex, scaley = dc.GetUserScale()
  3660                 scalex, scaley = dc.GetUserScale()
  3661                 dc.SetUserScale(1, 1)
  3661                 dc.SetUserScale(1, 1)
  3662 
  3662 
  3663                 is_action = self.TagName.split("::")[0] == "A"
  3663                 # is_action = self.TagName.split("::")[0] == "A"
  3664                 text = _("Debug: %s") % self.InstancePath
  3664                 text = _("Debug: %s") % self.InstancePath
  3665                 if is_action and self.Value is not None:
  3665                 '''if is_action and self.Value is not None:
  3666                     text += " ("
  3666                     text += " ("'''
  3667                 text_offset_x, text_offset_y = self.CalcUnscrolledPosition(2, 2)
  3667                 text_offset_x, text_offset_y = self.CalcUnscrolledPosition(2, 2)
  3668                 dc.DrawText(text, text_offset_x, text_offset_y)
  3668                 dc.DrawText(text, text_offset_x, text_offset_y)
  3669                 if is_action and self.Value is not None:
  3669                 # TODO  Fix self.Value in LD_Viewer instance.
       
  3670                 # This code used to highlight with green color text in upper-left corner
       
  3671                 # (path to current instance) in debug mode, if current instance active. Only SFC actions are affected.
       
  3672                 '''if is_action and self.Value is not None:
  3670                     value_text = self.VALUE_TRANSLATION[self.Value]
  3673                     value_text = self.VALUE_TRANSLATION[self.Value]
  3671                     tw, th = dc.GetTextExtent(text)
  3674                     tw, th = dc.GetTextExtent(text)
  3672                     if self.Value:
  3675                     if self.Value:
  3673                         dc.SetTextForeground(wx.GREEN)
  3676                         dc.SetTextForeground(wx.GREEN)
  3674                     dc.DrawText(value_text, text_offset_x + tw, text_offset_y)
  3677                     dc.DrawText(value_text, text_offset_x + tw, text_offset_y)
  3675                     if self.Value:
  3678                     if self.Value:
  3676                         dc.SetTextForeground(wx.BLACK)
  3679                         dc.SetTextForeground(wx.BLACK)
  3677                     vw, vh = dc.GetTextExtent(value_text)
  3680                     vw, vh = dc.GetTextExtent(value_text)
  3678                     dc.DrawText(")", text_offset_x + tw + vw + 2, text_offset_y)
  3681                     dc.DrawText(")", text_offset_x + tw + vw + 2, text_offset_y)'''
  3679 
  3682 
  3680                 dc.SetUserScale(scalex, scaley)
  3683                 dc.SetUserScale(scalex, scaley)
  3681 
  3684 
  3682             if self.rubberBand.IsShown():
  3685             if self.rubberBand.IsShown():
  3683                 self.rubberBand.Draw(dc)
  3686                 self.rubberBand.Draw(dc)