equal
deleted
inserted
replaced
21 # You should have received a copy of the GNU General Public License |
21 # You should have received a copy of the GNU General Public License |
22 # along with this program; if not, write to the Free Software |
22 # along with this program; if not, write to the Free Software |
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
24 |
24 |
25 |
25 |
26 from __future__ import absolute_import |
26 |
27 from __future__ import division |
27 |
28 |
28 |
29 import wx |
29 import wx |
30 |
30 |
31 from controls.DebugVariablePanel.DebugVariableViewer import DebugVariableViewer |
31 from controls.DebugVariablePanel.DebugVariableViewer import DebugVariableViewer |
32 from controls.DebugVariablePanel.GraphButton import GraphButton |
32 from controls.DebugVariablePanel.GraphButton import GraphButton |
205 # Get Graphics Context for DC, for anti-aliased and transparent |
205 # Get Graphics Context for DC, for anti-aliased and transparent |
206 # rendering |
206 # rendering |
207 gc = wx.GCDC(dc) |
207 gc = wx.GCDC(dc) |
208 |
208 |
209 # Get first item |
209 # Get first item |
210 item = self.ItemsDict.values()[0] |
210 item = list(self.ItemsDict.values())[0] |
211 |
211 |
212 # Get item variable path masked according Debug Variable Panel mask |
212 # Get item variable path masked according Debug Variable Panel mask |
213 item_path = item.GetVariable( |
213 item_path = item.GetVariable( |
214 self.ParentWindow.GetVariableNameMask()) |
214 self.ParentWindow.GetVariableNameMask()) |
215 |
215 |
237 """ |
237 """ |
238 Function called when mouse left button is pressed |
238 Function called when mouse left button is pressed |
239 @param event: wx.MouseEvent |
239 @param event: wx.MouseEvent |
240 """ |
240 """ |
241 # Get first item |
241 # Get first item |
242 item = self.ItemsDict.values()[0] |
242 item = list(self.ItemsDict.values())[0] |
243 |
243 |
244 # Calculate item path bounding box |
244 # Calculate item path bounding box |
245 _width, height = self.GetSize() |
245 _width, height = self.GetSize() |
246 item_path = item.GetVariable( |
246 item_path = item.GetVariable( |
247 self.ParentWindow.GetVariableNameMask()) |
247 self.ParentWindow.GetVariableNameMask()) |
276 """ |
276 """ |
277 Function called when mouse left button is double clicked |
277 Function called when mouse left button is double clicked |
278 @param event: wx.MouseEvent |
278 @param event: wx.MouseEvent |
279 """ |
279 """ |
280 # Only numeric variables can be toggled to graph canvas |
280 # Only numeric variables can be toggled to graph canvas |
281 if self.ItemsDict.values()[0].IsNumVariable(): |
281 if list(self.ItemsDict.values())[0].IsNumVariable(): |
282 self.ParentWindow.ToggleViewerType(self) |
282 self.ParentWindow.ToggleViewerType(self) |
283 |
283 |
284 def OnPaint(self, event): |
284 def OnPaint(self, event): |
285 """ |
285 """ |
286 Function called when redrawing Viewer content is needed |
286 Function called when redrawing Viewer content is needed |