mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-14 01:04:13 +02:00
TerminalStripItem add pdfRefs
Linux build and tests / Build and test (Qt 6, Debug) (push) Failing after 1m53s
Linux build and tests / Build and test (Qt 6, Debug) (push) Failing after 1m53s
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "qetgraphicsitem/dynamicelementtextitem.h"
|
||||
#include "qetgraphicsitem/element.h"
|
||||
#include "qetgraphicsitem/elementtextitemgroup.h"
|
||||
#include "TerminalStrip/GraphicsItem/terminalstripitem.h"
|
||||
|
||||
// Private Qt PDF engine for drawHyperlink() — not public API.
|
||||
// Availability of Qt::GuiPrivate is verified at configure time in CMakeLists.txt.
|
||||
@@ -150,6 +151,14 @@ void injectCrossRefLinks(QPdfEngine *engine, Diagram *diagram,
|
||||
continue;
|
||||
}
|
||||
|
||||
// --- Terminal strip plan: the xref of each terminal leads to its element ---
|
||||
if (auto *strip_item = dynamic_cast<TerminalStripItem*>(item)) {
|
||||
for (const TerminalStripItem::PdfRef &ref : strip_item->pdfRefs()) {
|
||||
injectLinkTo(ref.here, ref.diagram, ref.there);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// --- Folio report links (DynamicElementTextItem) ---
|
||||
if (auto *deti = dynamic_cast<DynamicElementTextItem*>(item)) {
|
||||
Element *parent = deti->parentElement();
|
||||
|
||||
Reference in New Issue
Block a user