forked from qt-creator/qt-creator
modeleditor: Improve debugging of relations on diagrams
Change-Id: I39d357f0b2fffe2db93cd389110cf3fc995d6e59 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1082,6 +1082,21 @@ void PropertiesView::MView::visitDItem(const DItem *item)
|
||||
void PropertiesView::MView::visitDRelation(const DRelation *relation)
|
||||
{
|
||||
visitDElement(relation);
|
||||
#ifdef SHOW_DEBUG_PROPERTIES
|
||||
if (!m_pointsLabel) {
|
||||
m_pointsLabel = new QLabel(m_topWidget);
|
||||
addRow(tr("Intermediate points:"), m_pointsLabel, "intermediate points");
|
||||
}
|
||||
QString points;
|
||||
for (const auto &point : relation->intermediatePoints()) {
|
||||
if (!points.isEmpty())
|
||||
points.append(", ");
|
||||
points.append(QString("(%1,%2)").arg(point.pos().x()).arg(point.pos().y()));
|
||||
}
|
||||
if (points.isEmpty())
|
||||
points = tr("none");
|
||||
m_pointsLabel->setText(points);
|
||||
#endif
|
||||
}
|
||||
|
||||
void PropertiesView::MView::visitDInheritance(const DInheritance *inheritance)
|
||||
|
@@ -256,6 +256,8 @@ protected:
|
||||
// DAnnotation
|
||||
QCheckBox *m_annotationAutoWidthCheckbox = nullptr;
|
||||
QComboBox *m_annotationVisualRoleSelector = nullptr;
|
||||
// DRelation
|
||||
QLabel *m_pointsLabel = nullptr;
|
||||
};
|
||||
|
||||
} // namespace qmt
|
||||
|
Reference in New Issue
Block a user