dialogs/BlockPreviewDialog.py
changeset 1740 b789b695b5c6
parent 1736 7e61baa047f0
child 1745 f9d32913bad4
equal deleted inserted replaced
1739:ec153828ded2 1740:b789b695b5c6
    60         self.Preview = wx.Panel(self, style=wx.SIMPLE_BORDER)
    60         self.Preview = wx.Panel(self, style=wx.SIMPLE_BORDER)
    61         self.Preview.SetBackgroundColour(wx.WHITE)
    61         self.Preview.SetBackgroundColour(wx.WHITE)
    62 
    62 
    63         # Add function to preview panel so that it answers to graphic elements
    63         # Add function to preview panel so that it answers to graphic elements
    64         # like Viewer
    64         # like Viewer
    65         setattr(self.Preview, "GetDrawingMode", lambda:FREEDRAWING_MODE)
    65         setattr(self.Preview, "GetDrawingMode", lambda: FREEDRAWING_MODE)
    66         setattr(self.Preview, "GetScaling", lambda:None)
    66         setattr(self.Preview, "GetScaling", lambda: None)
    67         setattr(self.Preview, "GetBlockType", controller.GetBlockType)
    67         setattr(self.Preview, "GetBlockType", controller.GetBlockType)
    68         setattr(self.Preview, "IsOfType", controller.IsOfType)
    68         setattr(self.Preview, "IsOfType", controller.IsOfType)
    69 
    69 
    70         # Bind paint event on Preview panel
    70         # Bind paint event on Preview panel
    71         self.Preview.Bind(wx.EVT_PAINT, self.OnPaint)
    71         self.Preview.Bind(wx.EVT_PAINT, self.OnPaint)