@@ -37,12 +37,16 @@ Item {
3737 //! \brief The ScopeStyle component.
3838 property var scopeStyle: null
3939
40+ //! Should the orientation be locked
41+ property int orientationLockCount: 0
42+
4043 clip: true
4144
4245 Binding {
4346 target: previewModel
4447 property: "widgetColumnCount"
4548 value: row.columns
49+ when: root.orientationLockCount === 0
4650 }
4751
4852 MouseArea {
@@ -109,6 +113,18 @@ Item {
109113 column.forceLayout();
110114 column.positionViewAtIndex(index, ListView.Contain)
111115 }
116+
117+ onOrientationLockChanged: {
118+ if (orientationLock)
119+ root.orientationLockCount++;
120+ else
121+ root.orientationLockCount = Math.max(0, root.orientationLockCount--);
122+ }
123+
124+ Component.onDestruction: {
125+ if (orientationLock)
126+ root.orientationLockCount = Math.max(0, root.orientationLockCount--);
127+ }
112128 }
113129 }
114130 }