controls/DebugVariablePanel/DebugVariableViewer.py
changeset 2459 21164625b393
parent 2456 7373e3048167
child 3750 f62625418bff
equal deleted inserted replaced
2458:2a70d5240300 2459:21164625b393
    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 from __future__ import absolute_import
       
    27 from __future__ import division
    27 from collections import OrderedDict
    28 from collections import OrderedDict
       
    29 from functools import reduce
    28 
    30 
    29 import wx
    31 import wx
    30 from matplotlib.backends.backend_wxagg import _convert_agg_to_wx_bitmap
    32 from matplotlib.backends.backend_wxagg import _convert_agg_to_wx_bitmap
    31 
    33 
    32 from dialogs.ForceVariableDialog import ForceVariableDialog
    34 from dialogs.ForceVariableDialog import ForceVariableDialog
   373         """
   375         """
   374         # Get Viewer size
   376         # Get Viewer size
   375         _width, height = self.GetSize()
   377         _width, height = self.GetSize()
   376 
   378 
   377         # Mouse is in the first half of Viewer
   379         # Mouse is in the first half of Viewer
   378         if y < height / 2:
   380         if y < height // 2:
   379             # If Viewer is the upper one, draw drop before highlight
   381             # If Viewer is the upper one, draw drop before highlight
   380             if self.ParentWindow.IsViewerFirst(self):
   382             if self.ParentWindow.IsViewerFirst(self):
   381                 self.SetHighlight(HIGHLIGHT_BEFORE)
   383                 self.SetHighlight(HIGHLIGHT_BEFORE)
   382 
   384 
   383             # Else draw drop after highlight in previous Viewer
   385             # Else draw drop after highlight in previous Viewer