From 5351746dc7f276d14700fc2370a6c00f61fd8805 Mon Sep 17 00:00:00 2001
From: Peter Kessen
Date: Tue, 18 Feb 2025 20:13:10 +0100
Subject: [PATCH 1/2] Fix typo within settings entry
---
sources/qetgraphicsitem/dynamicelementtextitem.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sources/qetgraphicsitem/dynamicelementtextitem.cpp b/sources/qetgraphicsitem/dynamicelementtextitem.cpp
index 17c4369b4..2e85b67b5 100644
--- a/sources/qetgraphicsitem/dynamicelementtextitem.cpp
+++ b/sources/qetgraphicsitem/dynamicelementtextitem.cpp
@@ -46,7 +46,7 @@ DynamicElementTextItem::DynamicElementTextItem(Element *parent_element) :
QSettings settings;
setRotation(settings.value("dynamic_text_rotation", 0).toInt());
setKeepVisualRotation(true);
- setTextWidth(settings.value("dynamic_text_widht", -1).toInt());
+ setTextWidth(settings.value("dynamic_text_width", -1).toInt());
connect(this, &DynamicElementTextItem::textEdited, [this](const QString &old_str, const QString &new_str)
{
if(this->m_parent_element && this->m_parent_element->diagram())
From 2097b24d37e8aa52e9f2e413abc1a8fb1e44c585 Mon Sep 17 00:00:00 2001
From: Peter Kessen
Date: Tue, 18 Feb 2025 20:14:51 +0100
Subject: [PATCH 2/2] Fix typo for variable
---
sources/ui/elementpropertieswidget.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sources/ui/elementpropertieswidget.cpp b/sources/ui/elementpropertieswidget.cpp
index e93e8e914..613caefb2 100644
--- a/sources/ui/elementpropertieswidget.cpp
+++ b/sources/ui/elementpropertieswidget.cpp
@@ -403,10 +403,10 @@ QWidget *ElementPropertiesWidget::generalWidget()
//Set the maximum size of the pixmap to the minimum size of the layout
QPixmap pixmap = m_element->pixmap();
int margin = vlayout_->contentsMargins().left() + vlayout_->contentsMargins().right();
- int widht_ = vlayout_->minimumSize().width()-margin;
+ int width_ = vlayout_->minimumSize().width()-margin;
- if (pixmap.size().width() > widht_ || pixmap.size().height() > widht_) {
- pix->setPixmap(m_element->pixmap().scaled (widht_, widht_, Qt::KeepAspectRatio, Qt::SmoothTransformation));
+ if (pixmap.size().width() > width_ || pixmap.size().height() > width_) {
+ pix->setPixmap(m_element->pixmap().scaled (width_, width_, Qt::KeepAspectRatio, Qt::SmoothTransformation));
}
else {
pix->setPixmap(pixmap);