Commit 014a143
fix: TreeView caret not rotating on expand/collapse (FritzAndFriends#361)
The NodeImage property's fallback paths (when ShowLines=false) did not
check ShowExpandCollapse, relying solely on ImageSet.Collapse being
non-empty. This made the logic fragile and returned Default_NoExpand.gif
for any ImageSet where Collapse was empty, even when ShowExpandCollapse
was true.
Restructured NodeImage to:
- Explicitly check ShowExpandCollapse in non-ShowLines code paths
- Always return distinct expand/collapse images when ShowExpandCollapse=true
- Fall back to Default_Collapse.gif / Default_Expand.gif when an ImageSet
does not provide its own collapse/expand images
- Return Default_NoExpand.gif only when ShowExpandCollapse is false
Extracted ExpandCollapseImage() helper to DRY the ImageSet-to-filename
resolution with guaranteed defaults.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 6506080 commit 014a143
1 file changed
Lines changed: 32 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
195 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
196 | 200 | | |
197 | 201 | | |
198 | 202 | | |
| |||
209 | 213 | | |
210 | 214 | | |
211 | 215 | | |
212 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
213 | 222 | | |
214 | 223 | | |
215 | 224 | | |
216 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
217 | 245 | | |
218 | 246 | | |
219 | 247 | | |
| |||
0 commit comments