Correcting dynamicElementTextItem alignment on copying

When copying and pasting selected areas, right-aligned dynamic text in
report and slave elements was not displayed correctly. The text
insertion point was always shifted to the left by the text width.

To correct this, the insertion point of dynamicElementTextItems is reset
to its origin insertion point before writing to clipboard.
This commit is contained in:
achim
2025-08-02 23:27:09 +02:00
parent f20ea041b6
commit 0a6efa466e
3 changed files with 93 additions and 4 deletions

View File

@@ -391,7 +391,7 @@ void DiagramView::cut()
void DiagramView::copy()
{
QClipboard *presse_papier = QApplication::clipboard();
QString contenu_presse_papier = m_diagram -> toXml(false).toString(4);
QString contenu_presse_papier = m_diagram -> toXml(false, true).toString(4);
if (presse_papier -> supportsSelection()) presse_papier -> setText(contenu_presse_papier, QClipboard::Selection);
presse_papier -> setText(contenu_presse_papier);
}