Skip to content

Suppress the crash when opening the context menu on a text field in the diagram editor#2088

Merged
iakov merged 3 commits intotrikset:masterfrom
MinyazevR:MinyazevR-label-crash
Feb 18, 2026
Merged

Suppress the crash when opening the context menu on a text field in the diagram editor#2088
iakov merged 3 commits intotrikset:masterfrom
MinyazevR:MinyazevR-label-crash

Conversation

@MinyazevR
Copy link
Member

@MinyazevR MinyazevR commented Feb 17, 2026

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

  1. Open a diagram with a text field (e.g., a label block).
  2. Right‑click on the text field – the application should not crash.
  3. Verify that text properties can still be edited via the property editor panel (top‑right).

@MinyazevR MinyazevR force-pushed the MinyazevR-label-crash branch from 9671f42 to 9937ff6 Compare February 17, 2026 16:43
@MinyazevR MinyazevR marked this pull request as draft February 17, 2026 16:43
@MinyazevR MinyazevR marked this pull request as ready for review February 17, 2026 19:15
@MinyazevR MinyazevR force-pushed the MinyazevR-label-crash branch from 0d7386c to 2d50dfb Compare February 17, 2026 19:17
@iakov iakov added this to the 2025.5 milestone Feb 18, 2026
@iakov iakov merged commit 0d7bb07 into trikset:master Feb 18, 2026
38 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants