Commit 37d9fdbf authored by Leander Schulten's avatar Leander Schulten
Browse files

ModuleView: Move Rectangle in ScrollView behind TextArea to prevent a crash...

ModuleView: Move Rectangle in ScrollView behind TextArea to prevent a crash while debugging. See https://bugreports.qt.io/browse/QTBUG-62292
parent ce920dac
Pipeline #190379 passed with stage
in 5 minutes and 11 seconds
......@@ -346,34 +346,6 @@ Item{
Layout.fillWidth: true
onHoveredChanged: if(!hovered && listView.currentModelData)listView.currentModelData.code = codeEditor.text
clip: true
Rectangle{
anchors.fill: codeEditor
anchors.topMargin: codeEditor.topPadding
TextMetrics{
font: codeEditor.font
text: "M"
id: textMetrics
}
Repeater{
model: codeEditorHelper.codeMarkups
Rectangle{
x: modelData.column * (textMetrics.width+1)
y: modelData.row * height
width: modelData.markupLength * (textMetrics.width+1)
height: codeEditor.lineHeight
color: modelData.error ? "red" : "orange"
MouseArea{
anchors.fill: parent
id: mouseArea
acceptedButtons: Qt.NoButton
hoverEnabled: true
}
ToolTip.text: modelData.message
ToolTip.visible: mouseArea.containsMouse
}
}
}
TextArea{
property real lineHeight: contentHeight/lineCount
font.family: "Liberation Mono"
......@@ -563,6 +535,35 @@ Item{
timer.start();
}
}
} // TextArea
// Must be behind TextArea because of https://bugreports.qt.io/browse/QTBUG-62292
Rectangle{
anchors.fill: codeEditor
anchors.topMargin: codeEditor.topPadding
TextMetrics{
font: codeEditor.font
text: "M"
id: textMetrics
}
Repeater{
model: codeEditorHelper.codeMarkups
Rectangle{
x: modelData.column * (textMetrics.width+1)
y: modelData.row * height
width: modelData.markupLength * (textMetrics.width+1)
height: codeEditor.lineHeight
color: modelData.error ? "red" : "orange"
MouseArea{
anchors.fill: parent
id: mouseArea
acceptedButtons: Qt.NoButton
hoverEnabled: true
}
ToolTip.text: modelData.message
ToolTip.visible: mouseArea.containsMouse
}
}
}
}
Button{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment