Skip to content

Commit

Permalink
Fix runtime error message
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <louise@openrobotics.org>
  • Loading branch information
chapulina committed Mar 7, 2022
1 parent 2aab159 commit c45bedf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/ignition/gui/qml/IgnSplit.qml
Original file line number Diff line number Diff line change
Expand Up @@ -276,14 +276,15 @@ SplitView {
* Callback when the children array has been changed.
*/
onChildrenChanged: {
if (children.length === 0)
return;

// Propagate child's minimum size changes to the item.
newItem.Layout.minimumWidth = Qt.binding(function() {
if (children.length === 0 || children[0] === undefined)
return 0;
return children[0].Layout.minimumWidth
});
newItem.Layout.minimumHeight = Qt.binding(function() {
if (children.length === 0 || children[0] === undefined)
return 0;
return children[0].Layout.minimumHeight
});
}
Expand Down

0 comments on commit c45bedf

Please sign in to comment.