Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 817b888b330118a5fc956d7022123df1778c8399 1 parent 0da0d36
Bouke Haarsma authored December 29, 2012

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  mvvm/viewbinding/grid.py
5  mvvm/viewbinding/grid.py
@@ -203,7 +203,10 @@ def BeginEdit(self, row, col, grid):
203 203
                 self.Control.SetInsertionPointEnd()
204 204
                 self.Control.SelectAll()
205 205
             else:
206  
-                self.start_value = self.choices[value]
  206
+                # self.choices might be a reference to a trait and cannot be
  207
+                # used here; the binding will parse the choices and is used
  208
+                # for determining the correct display value.
  209
+                self.start_value = self.binding.choices[value]
207 210
                 self.Control.SetStringSelection(self.start_value)
208 211
 
209 212
             # Windows kills the control if the event handler is enabled, so

0 notes on commit 817b888

Please sign in to comment.
Something went wrong with that request. Please try again.