Commit 6c5b66c
fix: hang and wrong check states in data grid column selection on macOS
Fixes the reported hang (issue 2554): closing the column selection popup
with OK could run FormClose twice on macOS, freeing FCheckedColumns two
times. The resulting access violation raised the crash dialog inside a
paint cycle, freezing the application. FCheckedColumns is now freed in
FormDestroy, which runs exactly once.
While verifying that fix, a second bug in the same popup showed up:
checked columns were not applied correctly to the grid. The click
handler used ItemIndex to detect the toggled item, but on Cocoa the
check event fires before the list selection is updated, so the wrong
item was added or removed. The handler now syncs the check states of
all displayed items instead.1 parent 4555274 commit 6c5b66c
1 file changed
Lines changed: 14 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | | - | |
156 | | - | |
157 | 155 | | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
163 | 164 | | |
164 | | - | |
165 | | - | |
166 | | - | |
| 165 | + | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
228 | 229 | | |
229 | 230 | | |
230 | 231 | | |
| |||
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
| 247 | + | |
| 248 | + | |
246 | 249 | | |
247 | | - | |
248 | 250 | | |
249 | 251 | | |
250 | 252 | | |
| |||
0 commit comments