Permalink
Browse files

Fix for wrong start value in grid choices linked to choice trait

  • Loading branch information...
1 parent 0da0d36 commit 817b888b330118a5fc956d7022123df1778c8399 @Bouke committed Dec 29, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 mvvm/viewbinding/grid.py
View
@@ -203,7 +203,10 @@ def BeginEdit(self, row, col, grid):
self.Control.SetInsertionPointEnd()
self.Control.SelectAll()
else:
- self.start_value = self.choices[value]
+ # self.choices might be a reference to a trait and cannot be
+ # used here; the binding will parse the choices and is used
+ # for determining the correct display value.
+ self.start_value = self.binding.choices[value]
self.Control.SetStringSelection(self.start_value)
# Windows kills the control if the event handler is enabled, so

0 comments on commit 817b888

Please sign in to comment.