Fix panic when loading bad text in the GUI.
This commit is contained in:
@@ -45,22 +45,25 @@ SplitView {
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 2
|
||||
// TODO: Make a ClideBreadCrumb element to support select parent paths as root
|
||||
Rectangle {
|
||||
width: navigationView.width
|
||||
height: breadCrumb.height + 5
|
||||
|
||||
color: RustColors.explorer_text
|
||||
height: 25
|
||||
color: RustColors.explorer_background
|
||||
Text {
|
||||
id: breadCrumb
|
||||
anchors.fill: parent
|
||||
text: clideTreeView.rootDirectory
|
||||
color: RustColors.explorer_text
|
||||
elide: Text.ElideLeft
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
}
|
||||
|
||||
ClideTreeView {
|
||||
id: clideTreeView
|
||||
onFileClicked: path => root.projectDir = path
|
||||
onFileClicked: path => clideEditor.filePath = path
|
||||
width: navigationView.width
|
||||
height: navigationView.height
|
||||
|
||||
@@ -70,6 +73,7 @@ SplitView {
|
||||
}
|
||||
}
|
||||
ClideEditor {
|
||||
id: clideEditor
|
||||
SplitView.fillWidth: true
|
||||
|
||||
// Provide a path to the file currently open in the text editor.
|
||||
|
||||
Reference in New Issue
Block a user