Skip to content

Commit

Permalink
Fixed null issue, added missing qtquick-shapes dep
Browse files Browse the repository at this point in the history
  • Loading branch information
vranki committed Nov 24, 2019
1 parent 0b92220 commit 582b8b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Homepage: https://github.com/vranki/ExtPlane-Panel

Package: extplane-panel
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, qml-module-qt-labs-settings, qml-module-qtquick-layouts, qml-module-qtquick-window2, qml-module-qtquick2, qml-module-qtquick-dialogs, qml-module-qtquick-controls
Depends: ${shlibs:Depends}, ${misc:Depends}, qml-module-qt-labs-settings, qml-module-qtquick-layouts, qml-module-qtquick-window2, qml-module-qtquick2, qml-module-qtquick-dialogs, qml-module-qtquick-controls, qml-module-qtquick-shapes
Description: An external, networked cockpit panel for X-Plane flight simulator and a couple of others.
It is possible to run this panel on the same computer or another computer on the
network to display cockpit instruments from remote X-Plane.
Expand Down
8 changes: 4 additions & 4 deletions qmlui/AddItemDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import QtQuick.Dialogs 1.2
Dialog {
id: addItemDialog
modality: Qt.NonModal
property string previewItem: null
property string previewItem: ""
signal addItem(string itemName)
standardButtons: StandardButton.Cancel | StandardButton.Ok
width: 600
Expand Down Expand Up @@ -51,7 +51,7 @@ Dialog {
item.y = 0
}
source: previewItem ? "qrc:///panelitems/" + previewItem + ".qml" : ""
active: previewItem !== null
active: previewItem !== ""
width: parent.width * 0.8
height: parent.height * 0.8
anchors.centerIn: parent
Expand All @@ -62,11 +62,11 @@ Dialog {
if(previewItem) {
// Destroy the preview before adding
var newItem = previewItem
previewItem = null
previewItem = ""
addItem(newItem)
}
}
onVisibleChanged: previewItem = null
onVisibleChanged: previewItem = ""

// Todo: Auto-generate this list from the directory contents.
ListModel {
Expand Down

0 comments on commit 582b8b8

Please sign in to comment.