mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user