mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
check if parent exists before using width and height properties from it
This commit is contained in:
parent
4801ace546
commit
fd86cc84e2
1 changed files with 3 additions and 2 deletions
|
@ -8,8 +8,9 @@ import Cura 1.0 as Cura
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
width: parent.width
|
// parent could be undefined as this component is not visible at all times
|
||||||
height: parent.height
|
width: parent ? parent.width : 0
|
||||||
|
height: parent ? parent.height : 0
|
||||||
|
|
||||||
// We show a nice overlay on the 3D viewer when the current output device has no monitor view
|
// We show a nice overlay on the 3D viewer when the current output device has no monitor view
|
||||||
Rectangle
|
Rectangle
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue