diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-16 18:33:51 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-16 18:33:51 -0400 |
| commit | c60e775536a45c4d75502351bfd2f9285b275abf (patch) | |
| tree | ec4ecbb15de02793c3e4af63c461b2a3d78bb5e7 | |
| parent | 6d56f6f6b7aae235916b1197540e9d350b4877b8 (diff) | |
Fixed crashing glitch in Table on Windows.
| -rw-r--r-- | redo/table_windows.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/redo/table_windows.go b/redo/table_windows.go index 2f9155d..b65202a 100644 --- a/redo/table_windows.go +++ b/redo/table_windows.go @@ -60,14 +60,11 @@ func tableGetCell(data unsafe.Pointer, item *C.LVITEMW) { defer t.RUnlock() d := reflect.Indirect(reflect.ValueOf(t.data)) datum := d.Index(int(item.iItem)).Field(int(item.iSubItem)) + // TODO figure out why changing item.mask causes crashes or why "it just works" switch d := datum.Interface().(type) { case ImageIndex: - item.mask |= C.LVIF_IMAGE - item.mask &^= C.LVIF_TEXT item.iImage = C.int(d) default: - item.mask |= C.LVIF_TEXT - item.mask &^= C.LVIF_IMAGE s := fmt.Sprintf("%v", datum) item.pszText = toUTF16(s) } |
