# HG changeset patch # User Laurent Bessard # Date 1368394350 -7200 # Node ID 55ed55ef7aeabda82dfcb0dc4b40a13200eb761f # Parent 84de51ab40d2e496a246dd43f5146b057c5ddafb Fixed bug on biggest Viewer zoom factor preventing them to be used on Windows diff -r 84de51ab40d2 -r 55ed55ef7aea editors/Viewer.py --- a/editors/Viewer.py Sun May 12 23:30:00 2013 +0200 +++ b/editors/Viewer.py Sun May 12 23:32:30 2013 +0200 @@ -74,7 +74,11 @@ 'size' : 12, } -ZOOM_FACTORS = [math.sqrt(2) ** x for x in xrange(-6, 7)] +if wx.Platform == '__WXMSW__': + MAX_ZOOMIN = 4 +else: + MAX_ZOOMIN = 7 +ZOOM_FACTORS = [math.sqrt(2) ** x for x in xrange(-6, MAX_ZOOMIN)] def GetVariableCreationFunction(variable_type): def variableCreationFunction(viewer, id, specific_values): @@ -608,7 +612,7 @@ self.MiniTextDC.SetFont(wx.Font(faces["size"] * 0.75, wx.SWISS, wx.NORMAL, wx.NORMAL, faceName = faces["helv"])) self.CurrentScale = None - self.SetScale(len(ZOOM_FACTORS) / 2, False) + self.SetScale(ZOOM_FACTORS.index(1.0), False) self.RefreshHighlightsTimer = wx.Timer(self, -1) self.Bind(wx.EVT_TIMER, self.OnRefreshHighlightsTimer, self.RefreshHighlightsTimer)