element editor: add mirror and flip for “text”

Maybe not (yet) perfect, but it looks pretty good to me!

Why am I doing this to myself?
All this crap with fonts and stuff!
It's been crap for as long as I can remember.
This commit is contained in:
plc-user
2025-02-17 19:39:53 +01:00
parent 0f647a5c38
commit dc836248f0
3 changed files with 37 additions and 2 deletions

View File

@@ -686,7 +686,7 @@ void MirrorElementsCommand::redo()
foreach (auto *item, m_items) {
if (item->type() == PartText::Type) {
PartText* staticText = qgraphicsitem_cast<PartText*>(item);
//staticText->mirror();
staticText->mirror();
} else if (item->type() == PartDynamicTextField::Type) {
PartDynamicTextField* dyntext = qgraphicsitem_cast<PartDynamicTextField*>(item);
dyntext->mirror();
@@ -734,7 +734,7 @@ void FlipElementsCommand::redo()
foreach (auto *item, m_items) {
if (item->type() == PartText::Type) {
PartText* staticText = qgraphicsitem_cast<PartText*>(item);
//staticText->flip();
staticText->flip();
} else if (item->type() == PartDynamicTextField::Type) {
PartDynamicTextField* dyntext = qgraphicsitem_cast<PartDynamicTextField*>(item);
dyntext->flip();