Change the fix again to not go into recursion problems on windows

This commit is contained in:
DarkPhoenix
2019-04-24 12:00:48 +03:00
parent b70fcd9659
commit 3a26815d18
3 changed files with 4 additions and 4 deletions

View File

@@ -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()

View File

@@ -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()

View File

@@ -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