QmlDesigner: Always show timeline settings panel mapping table

An empty table is confusing. Once a state is added we
enforce an id for the root node.

Task-number: QDS-1218
Change-Id: Ifc2c0317dfbed2c8d8b9dd540079e6879fe4f2a9
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Thomas Hartmann
2019-11-12 11:06:14 +01:00
parent 5df7ad94ec
commit 725432be04

View File

@@ -149,7 +149,7 @@ void TimelineSettingsModel::resetModel()
setHorizontalHeaderLabels( setHorizontalHeaderLabels(
QStringList({tr("State"), tr("Timeline"), tr("Animation"), tr("Fixed Frame")})); QStringList({tr("State"), tr("Timeline"), tr("Animation"), tr("Fixed Frame")}));
if (timelineView()->isAttached() && timelineView()->rootModelNode().hasId()) { if (timelineView()->isAttached()) {
addState(ModelNode()); addState(ModelNode());
for (const QmlModelState &state : for (const QmlModelState &state :
QmlVisualNode(timelineView()->rootModelNode()).states().allStates()) QmlVisualNode(timelineView()->rootModelNode()).states().allStates())