The constructor of BorderTitleBlock sets the border and title block
properties through importBorder() and importTitleBlock(). Their setters
(displayColumns(), setColumnsCount(), ...) compare the new value with
the member before storing it, and at that point the members have never
been written: display_columns_, display_rows_, the counts and sizes,
and m_edge are read uninitialised. UndefinedBehaviorSanitizer stops
every command-line run of the binary on the first of them:
bordertitleblock.cpp:455:23: runtime error: load of value 190,
which is not a valid value for type 'bool'
#0 BorderTitleBlock::displayColumns(bool)
#1 BorderTitleBlock::importBorder(BorderProperties const&)
#2 BorderTitleBlock::BorderTitleBlock(QObject*)
Give those members a default value in the header: false, 0 and
Qt::BottomEdge. The constructor then compares against known values. No
behaviour changes: the only effect of the comparisons in the constructor
is a displayChanged() signal nobody is connected to yet, and the
defaults of BorderProperties and TitleBlockProperties are all non-zero,
so no setter skips its clamp.
No file-format change. Tests: the sanitizer build of the Linux CI job
(separate PR) fails on master with the report above and passes with
this change; ctest on macOS 56/57, the failure being tst_elementautonumids
as on master.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Beat Hangartner <beat@hangartners.ch>
Schemas now get saved with a UUID and do not have to be looked up according to the form. They can be renamed and it gets reflected in existing elements. The GUI for
editing them is now much easier, e.g. forms can be reshuffled. A formula can be applied. Many options now also for conductors and sheets.
Typing a cell reference into the "Atteindre un élément" popup now offers
"Case B13"; Enter zooms the view onto that cell with one cell of margin.
The cell is read the way the border labels it: row letter(s) then column
number, honouring the "columns start at 0" setting and multi-letter rows
(AA, AB...). Cells outside the folio are not offered.
BorderTitleBlock::cellRect() is the reverse of convertPosition(); a
round trip over every cell of a 30x23 folio, under both column-numbering
settings, returned the same cell for all 1380.
When an element is labelled exactly like the cell (K1), the element stays
first so Enter keeps its old meaning; the cell is listed after it.
DiagramView::zoomToRect() re-centres from a queued call: zooming in makes
the scroll bars appear, and the viewport resize that follows is anchored
under the mouse (setResizeAnchor(AnchorUnderMouse)), which otherwise
scrolls the view away from the cell straight after the zoom.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G2d2Zi8BfrYRPX88zhaoFG
Remove setter function : void BorderTitleBlock::setTitle(const QString
&title)
Remove singal diagramTitleChanged from BorderTitleBlock and use instead
the signal informationChanged.