Commit 9b598f1
committed
fix(polygon): handle events correctly when placing polygon inside another
When placing a new polygon inside an existing one:
- Right-click to remove points now works correctly
- Old polygon handles no longer show on hover
- Tooltip doesn't appear for containing polygon after placing finishes
Key changes:
- Check getPlacing() before activeState in handleRightButtonPress
- Check if any other widget has focus before handling events
- Properly release focus when polygon finishes placing
- Hide handles on finished polygons when another is placing with points1 parent b616796 commit 9b598f1
3 files changed
Lines changed: 360 additions & 15 deletions
File tree
- src
- components/tools/polygon
- vtk/PolygonWidget
- tests/specs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
104 | 109 | | |
105 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
106 | 115 | | |
107 | 116 | | |
108 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | 249 | | |
254 | | - | |
255 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
256 | 255 | | |
257 | 256 | | |
258 | 257 | | |
| |||
344 | 343 | | |
345 | 344 | | |
346 | 345 | | |
347 | | - | |
348 | 346 | | |
349 | 347 | | |
350 | 348 | | |
| |||
423 | 421 | | |
424 | 422 | | |
425 | 423 | | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
| 424 | + | |
430 | 425 | | |
431 | 426 | | |
432 | 427 | | |
433 | 428 | | |
434 | 429 | | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
435 | 434 | | |
436 | | - | |
437 | | - | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
438 | 440 | | |
439 | 441 | | |
440 | 442 | | |
| |||
465 | 467 | | |
466 | 468 | | |
467 | 469 | | |
468 | | - | |
| 470 | + | |
| 471 | + | |
469 | 472 | | |
470 | 473 | | |
471 | 474 | | |
| |||
475 | 478 | | |
476 | 479 | | |
477 | 480 | | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
478 | 484 | | |
479 | 485 | | |
480 | 486 | | |
| |||
0 commit comments