Commit 4f2511f
authored
fix: settings window crash after changing tile dimensions (#2796)
* fix: crash when opening the settings window after changing tile dimensions
Fixes #2795
This fix ensures that when updating value ranges within Sliders and LabeledSliders:
- If the new minimum is greater than the current maximum, we set the maximum first to avoid the validation error
- If the new maximum is less than the current minimum, we set the minimum first
- Otherwise, we can safely set them in the original order
This prevents the intermediate state where minimum temporarily exceeds maximum, which was causing the crash when opening the settings window after changing tile dimensions.
* panda's review (I)
(tested: working as intended!)
Signed-off-by: Arufonsu <17498701+Arufonsu@users.noreply.github.com>
* panda's review (II)
Signed-off-by: Arufonsu <17498701+Arufonsu@users.noreply.github.com>
---------
Signed-off-by: Arufonsu <17498701+Arufonsu@users.noreply.github.com>1 parent 4891f3c commit 4f2511f
2 files changed
Lines changed: 39 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
382 | 402 | | |
383 | 403 | | |
384 | 404 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
461 | | - | |
462 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
463 | 479 | | |
464 | 480 | | |
465 | 481 | | |
| |||
0 commit comments