Implement auto proportion scaling weights

This commit is contained in:
DarkPhoenix
2019-08-07 09:12:50 +03:00
parent f315f8b85a
commit f52fda3f03
5 changed files with 14 additions and 2 deletions

View File

@@ -270,8 +270,15 @@ class GraphControlPanel(wx.Panel):
self.targetList.refreshExtraColumns(view.tgtExtraCols)
self.srcTgtSizer.Detach(self.sourceList)
self.srcTgtSizer.Detach(self.targetList)
self.srcTgtSizer.Add(self.sourceList, self.sourceList.ColumnCount, wx.EXPAND | wx.ALL, 0)
self.srcTgtSizer.Add(self.targetList, self.targetList.ColumnCount, wx.EXPAND | wx.LEFT, 10)
def getProportion(wrapperList):
propWidth = 0
for column in wrapperList.activeColumns:
propWidth += column.proportionWidth
return propWidth
self.srcTgtSizer.Add(self.sourceList, getProportion(self.sourceList), wx.EXPAND | wx.ALL, 0)
self.srcTgtSizer.Add(self.targetList, getProportion(self.targetList), wx.EXPAND | wx.LEFT, 10)
self.Layout()
def OnShowLegendChange(self, event):