Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions LabelGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ def SetProperties(self):
if txt != "":
self.old_label = txt
self.old_pos = self.block.label_pos

### update the radio button position depending on the model position label
self.m_radioBtn1.SetValue(self.old_pos == 'center')
self.m_radioBtn2.SetValue(self.old_pos == 'top')
self.m_radioBtn3.SetValue(self.old_pos == 'bottom')

def SetCanvas(self, canvas):
"""
Expand Down
10 changes: 8 additions & 2 deletions PropertiesGridCtrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,7 @@ def __init__(self, parent):
self.Bind(gridlib.EVT_GRID_SELECT_CELL, self.OnSelectProp)
self.Bind(wx.EVT_ENTER_WINDOW, self.OnEnterWindow)
self.Bind(gridlib.EVT_GRID_CELL_RIGHT_CLICK, self.OnRightClick)
self.Bind(gridlib.EVT_GRID_COL_SORT, self.OnGridColSort)

# put a tooltip on a column label
self.GetGridColLabelWindow().Bind(wx.EVT_MOTION,self.onMouseOverColLabel)
Expand Down Expand Up @@ -773,6 +774,11 @@ def OnRightClick(self, event):
self.PopupMenu(menu, event.GetPosition())
menu.Destroy()

def OnGridColSort(self, event):
"""
"""
self.SetSortingColumn(event.Getcol())

###
def OnEditCell(self, evt):
"""
Expand Down Expand Up @@ -892,7 +898,7 @@ def SelectProp(self, evt):
"""
"""

row, col = evt.GetRow(), evt.GetCol()
row, col, pos= evt.GetRow(), evt.GetCol(), evt.GetPosition()

table = self.GetTable()

Expand Down Expand Up @@ -1081,7 +1087,7 @@ def SelectProp(self, evt):
else:
pass

### all properties grid update (because the python classe has been changed)
### all properties grid update (because the python class has been changed)
### here, because OnAcceptProp should be executed before
if prop == 'python_path':

Expand Down