Skip to content

Commit 46e9e01

Browse files
committed
gui PySide6 port: Fix access to properties for some QML components
1 parent 01b9aea commit 46e9e01

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

sdt/gui/SdtGui/FrameSelector.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ T.FrameSelector {
4848
}
4949

5050
onCurrentExcitationTypeChanged: {
51-
for (var i = 0; i < excSel.model.length; i++) {
51+
var len = excSel.model != null ? excSel.model.length : 0
52+
for (var i = 0; i < len; i++) {
5253
if (excSel.model[i] == currentExcitationType) {
5354
excSel.currentIndex = i
5455
break

sdt/gui/SdtGui/ImageDisplay.qml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,7 @@ Item {
216216
early upon shutdown, which could cause
217217
"Type Error: Cannot read property '…' of null" and segfaults
218218
(Pyside6 6.4.3)
219-
220-
Sdt.setQObjectParent(img, root)
221219
*/
220+
Sdt.setQObjectParent(img, root)
222221
}
223222
}

sdt/gui/SdtGui/ImageSelector.qml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ Item {
9696
return
9797
if (roles.length > 0 &&
9898
roles.filter(
99-
function(v){return model.fileRoles.includes(v)}).length <= 0)
99+
function(v){
100+
return fileSel.model.fileRoles.includes(v)
101+
}).length <= 0)
100102
return
101103
openFiles()
102104
}

sdt/gui/SdtGui/ImageViewer.qml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,9 @@ Item {
6060
early upon shutdown, which could cause
6161
"Type Error: Cannot read property '…' of null" and segfaults
6262
(Pyside6 6.4.3)
63-
63+
*/
6464
Sdt.setQObjectParent(frameSel, root)
6565
Sdt.setQObjectParent(imSel, root)
6666
Sdt.setQObjectParent(imDisp, root)
67-
*/
6867
}
6968
}

0 commit comments

Comments
 (0)