Commit 2fd90b9
committed
Fix GUI content loss during delete/undo operations
- Use proper setter methods instead of direct property assignment in undo
- Changed to use set_code() and set_gui_code() during node restoration
- Ensures rebuild_gui() is called to create widgets before apply_gui_state()
- Enhanced debug output for GUI state capture and restoration process
- Added comprehensive GUI widget validation during restoration
Resolves the "GUI empty after undo" bug where restored nodes had correct
size and pins but missing GUI content. The issue was that GUI widgets
weren't being recreated because rebuild_gui() wasn't called, causing
apply_gui_state() to fail silently.
The key insight: Direct property assignment bypasses the rebuild process,
while setter methods properly trigger GUI reconstruction.
🤖 Generated with [Claude Code](https://claude.ai/code)1 parent 02e11b8 commit 2fd90b9
1 file changed
Lines changed: 19 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
278 | | - | |
279 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
280 | 282 | | |
281 | 283 | | |
282 | 284 | | |
| |||
309 | 311 | | |
310 | 312 | | |
311 | 313 | | |
312 | | - | |
| 314 | + | |
313 | 315 | | |
314 | | - | |
315 | | - | |
| 316 | + | |
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
| |||
346 | 347 | | |
347 | 348 | | |
348 | 349 | | |
349 | | - | |
350 | | - | |
| 350 | + | |
| 351 | + | |
351 | 352 | | |
352 | 353 | | |
353 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
354 | 357 | | |
| 358 | + | |
| 359 | + | |
355 | 360 | | |
356 | 361 | | |
357 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
358 | 368 | | |
359 | 369 | | |
360 | 370 | | |
| |||
0 commit comments