From a7f4be0c12f8e8e947ddb26f31257c0b8d961cb0 Mon Sep 17 00:00:00 2001 From: blacksun Date: Sun, 31 Mar 2019 13:49:07 +0000 Subject: [PATCH] Same as previous commit, for the element editor. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5816 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- .../editor/ui/elementpropertieseditorwidget.cpp | 14 +++++++++++--- sources/ui/elementinfowidget.cpp | 8 ++++---- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/sources/editor/ui/elementpropertieseditorwidget.cpp b/sources/editor/ui/elementpropertieseditorwidget.cpp index 6b30eeb3a..d066fc5ec 100644 --- a/sources/editor/ui/elementpropertieseditorwidget.cpp +++ b/sources/editor/ui/elementpropertieseditorwidget.cpp @@ -61,7 +61,6 @@ ElementPropertiesEditorWidget::ElementPropertiesEditorWidget(QString &basic_type ui->setupUi(this); setUpInterface(); upDateInterface(); - qDebug() << "const"; } /** @@ -180,8 +179,17 @@ void ElementPropertiesEditorWidget::on_m_buttonBox_accepted() m_kind_info.addValue("type", ui -> m_master_type_cb -> itemData(ui -> m_master_type_cb -> currentIndex())); } - for (QTreeWidgetItem *qtwi : ui->m_tree->invisibleRootItem()->takeChildren()) { - m_elmt_info.addValue(qtwi->data(0, Qt::UserRole).toString(), qtwi->text(1)); + for (QTreeWidgetItem *qtwi : ui->m_tree->invisibleRootItem()->takeChildren()) + { + QString txt = qtwi->text(1); + //Replace html line feed + txt.replace(" ", " "); //hexa + txt.replace(" ", " "); //decimal + //Replace html carriage return + txt.replace(" ", " "); //hexa + txt.replace(" ", " "); //decimal + + m_elmt_info.addValue(qtwi->data(0, Qt::UserRole).toString(), txt); } this->close(); diff --git a/sources/ui/elementinfowidget.cpp b/sources/ui/elementinfowidget.cpp index 115381d78..8f40c11d8 100644 --- a/sources/ui/elementinfowidget.cpp +++ b/sources/ui/elementinfowidget.cpp @@ -238,11 +238,11 @@ DiagramContext ElementInfoWidget::currentInfo() const { QString txt = eipw->text(); //Replace html line feed - txt.replace(" ", " "); //hexa - txt.replace(" ", " "); //decimal + txt.replace(" ", " "); //hexa + txt.replace(" ", " "); //decimal //Replace html carriage return - txt.replace(" ", " "); //hexa - txt.replace(" ", " "); //decimal + txt.replace(" ", " "); //hexa + txt.replace(" ", " "); //decimal info_.addValue(eipw->key(), txt); } }