mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-05 13:16:48 +02:00
Some QML properties access exposed Python objects that may or may not be null upon their access. When these objects are accessed while null, QML issues "TypeError" warnings. These warnings have no functional impact as QML correctly handles trying to access null objects, but can spam the logs. This commit aims at fixing all these warnings by checking that the Python objects are not null before being accessed.
38 lines
853 B
QML
38 lines
853 B
QML
import QtQuick 2.11
|
|
import QtQuick.Controls 2.3
|
|
import QtQuick.Layouts 1.3
|
|
import Controls 1.0
|
|
|
|
import "common.js" as Common
|
|
|
|
/**
|
|
* Displays Node documentation
|
|
*/
|
|
FocusScope {
|
|
id: root
|
|
|
|
property variant node
|
|
|
|
SystemPalette { id: activePalette }
|
|
|
|
ScrollView {
|
|
width: parent.width
|
|
height: parent.height
|
|
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
|
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
|
clip: true
|
|
|
|
TextEdit {
|
|
width: parent.parent.width
|
|
height: parent.height
|
|
|
|
padding: 8
|
|
textFormat: TextEdit.MarkdownText
|
|
selectByMouse: true
|
|
selectionColor: activePalette.highlight
|
|
color: activePalette.text
|
|
text: node ? node.documentation : ""
|
|
wrapMode: TextEdit.Wrap
|
|
}
|
|
}
|
|
}
|