Commit 0d7bb07
authored
Suppress the crash when opening the context menu on a text field in the diagram editor (#2088)
* Suppress the crash when opening the context menu on a text field in the chart editor
* Fix Vera++ warnings
* Improve Code
-----------
Problem
Opening the context menu on a text field (e.g., label item) inside the diagram editor causes a crash in builds using Qt 5.15.2. The crash originates from a known bug in this Qt version, which is not present in newer releases (≥5.15.3). Unfortunately, the current Qt SDK does not provide a newer version, making a direct fix impossible at this time.
Solution
This PR suppresses the crash by preventing the context menu from being triggered on the graphical text item. Instead, users can still access and modify text properties via the property editor panel (located on the top-right side of the window). This approach eliminates the crash while preserving the ability to change properties through an alternative UI element.
Limitations
The context menu on the text field itself will no longer appear.
Full functionality will only be restored after upgrading to Qt 5.15.3+ or refactoring the affected components—both of which are considered non-trivial and are not planned for the near future.
Impact
No more crashes when right‑clicking on text fields.
Users must use the property editor panel to modify text properties.
This is a temporary workaround to improve stability until a more comprehensive solution becomes feasible.
How to test
Open a diagram with a text field (e.g., a label block).
Right‑click on the text field – the application should not crash.
Verify that text properties can still be edited via the property editor panel (top‑right).1 parent ad7dc6a commit 0d7bb07
2 files changed
+23
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
48 | | - | |
49 | | - | |
| 48 | + | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
| |||
188 | 187 | | |
189 | 188 | | |
190 | 189 | | |
191 | | - | |
| 190 | + | |
192 | 191 | | |
193 | 192 | | |
194 | 193 | | |
| |||
197 | 196 | | |
198 | 197 | | |
199 | 198 | | |
200 | | - | |
| 199 | + | |
| 200 | + | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
| 238 | + | |
238 | 239 | | |
239 | 240 | | |
240 | 241 | | |
| |||
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
267 | | - | |
| 268 | + | |
| 269 | + | |
268 | 270 | | |
269 | 271 | | |
270 | 272 | | |
| |||
350 | 352 | | |
351 | 353 | | |
352 | 354 | | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
353 | 364 | | |
354 | 365 | | |
355 | 366 | | |
| |||
471 | 482 | | |
472 | 483 | | |
473 | 484 | | |
474 | | - | |
| 485 | + | |
475 | 486 | | |
476 | 487 | | |
477 | 488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
86 | | - | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| |||
0 commit comments