mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +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:
@@ -142,6 +142,8 @@ class Diagram : public QGraphicsScene
|
||||
void wheelEvent (QGraphicsSceneWheelEvent *event) override;
|
||||
void keyPressEvent (QKeyEvent *event) override;
|
||||
void keyReleaseEvent (QKeyEvent *) override;
|
||||
void correctTextPos(Element* elmt);
|
||||
void restoreText(Element* elmt);
|
||||
|
||||
public:
|
||||
QUuid uuid();
|
||||
@@ -167,7 +169,7 @@ class Diagram : public QGraphicsScene
|
||||
QList < QSet <Conductor *> > potentials();
|
||||
|
||||
// methods related to XML import/export
|
||||
QDomDocument toXml(bool = true);
|
||||
QDomDocument toXml(bool wholeContent = true, bool is_copy_command = false);
|
||||
bool initFromXml(QDomElement &,
|
||||
QPointF = QPointF(),
|
||||
bool = true,
|
||||
|
||||
Reference in New Issue
Block a user