From 3a26815d180ae1573fb28e90c63ac1a56c2f165c Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Wed, 24 Apr 2019 12:00:48 +0300 Subject: [PATCH] Change the fix again to not go into recursion problems on windows --- gui/builtinAdditionPanes/projectedView.py | 2 +- gui/builtinViews/fittingView.py | 2 +- gui/display.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/builtinAdditionPanes/projectedView.py b/gui/builtinAdditionPanes/projectedView.py index a0ba7fdae..7d9748ed5 100644 --- a/gui/builtinAdditionPanes/projectedView.py +++ b/gui/builtinAdditionPanes/projectedView.py @@ -288,7 +288,7 @@ class ProjectedView(d.Display): if fitID is None: return - if self.getColumn(self.ScreenToClient(event.Position)) == self.getColIndex(State): + if self.getColumn(self.screenToClientFixed(event.Position)) == self.getColIndex(State): return sel = self.GetFirstSelected() diff --git a/gui/builtinViews/fittingView.py b/gui/builtinViews/fittingView.py index c858434c0..97ecfd747 100644 --- a/gui/builtinViews/fittingView.py +++ b/gui/builtinViews/fittingView.py @@ -620,7 +620,7 @@ class FittingView(d.Display): event.Skip() def spawnMenu(self, event): - if self.activeFitID is None or self.getColumn(self.ScreenToClient(event.Position)) == self.getColIndex(State): + if self.activeFitID is None or self.getColumn(self.screenToClientFixed(event.Position)) == self.getColIndex(State): return sMkt = Market.getInstance() diff --git a/gui/display.py b/gui/display.py index f009bd251..ac2746628 100644 --- a/gui/display.py +++ b/gui/display.py @@ -275,11 +275,11 @@ class Display(wx.ListCtrl): def getRowByAbs(self, pointAbs): if pointAbs == wx.Point(-1, -1): return -1 - pointRel = self.ScreenToClient(pointAbs) + pointRel = self.screenToClientFixed(pointAbs) row, flags = self.HitTest(pointRel) return row - def ScreenToClient(self, ptScreen): + def screenToClientFixed(self, ptScreen): """ Wx' ScreenToClient implementation seems to not consider header row height when converting to screen position: https://github.com/wxWidgets/Phoenix/issues/1213