mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Force set dynamic text length to default -1
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5618 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -34,7 +34,7 @@ PartDynamicTextField::PartDynamicTextField(QETElementEditor *editor, QGraphicsIt
|
|||||||
setFont(QETApp::dynamicTextsItemFont());
|
setFont(QETApp::dynamicTextsItemFont());
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
setRotation(settings.value("dynamic_rotation", 0).toInt());
|
setRotation(settings.value("dynamic_rotation", 0).toInt());
|
||||||
setTextWidth(settings.value("dynamic_with", 0).toInt());
|
setTextWidth(settings.value("dynamic_with", -1).toInt());
|
||||||
setText("_");
|
setText("_");
|
||||||
setTextFrom(DynamicElementTextItem::UserText);
|
setTextFrom(DynamicElementTextItem::UserText);
|
||||||
setFlags(QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemSendsGeometryChanges | QGraphicsItem::ItemIsMovable);
|
setFlags(QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemSendsGeometryChanges | QGraphicsItem::ItemIsMovable);
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ DynamicElementTextItem::DynamicElementTextItem(Element *parent_element) :
|
|||||||
setParentItem(parent_element);
|
setParentItem(parent_element);
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
setRotation(settings.value("dynamic_rotation", 0).toInt());
|
setRotation(settings.value("dynamic_rotation", 0).toInt());
|
||||||
setTextWidth(settings.value("dynamic_with", 0).toInt());
|
setTextWidth(settings.value("dynamic_with", -1).toInt());
|
||||||
connect(this, &DynamicElementTextItem::textEdited, [this](const QString &old_str, const QString &new_str)
|
connect(this, &DynamicElementTextItem::textEdited, [this](const QString &old_str, const QString &new_str)
|
||||||
{
|
{
|
||||||
if(this->m_parent_element && this->m_parent_element->diagram())
|
if(this->m_parent_element && this->m_parent_element->diagram())
|
||||||
|
|||||||
Reference in New Issue
Block a user