Skip to content

Commit

Permalink
Merge pull request #15 from psifidotos/fix
Browse files Browse the repository at this point in the history
fix crash and imrove startup time
  • Loading branch information
kotelnik authored Feb 7, 2017
2 parents 0cf1576 + 7aa094a commit 964a950
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions package/contents/ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Item {
id: main

// general settings
property bool inStart: true
property bool showLo: plasmoid.configuration.showLo
property bool showDdWrt: plasmoid.configuration.showDdWrt
property double updateInterval: plasmoid.configuration.updateInterval * 1000
Expand Down Expand Up @@ -155,7 +156,8 @@ Item {
}

Component.onCompleted: {
reloadComponent()
reloadComponent();
inStart = false;
}

function reloadComponent() {
Expand Down Expand Up @@ -232,8 +234,15 @@ Item {
setItemSize()
}

onShowLoChanged: devicesChanged()
onShowDdWrtChanged: devicesChanged()
onShowLoChanged: {
if (!inStart)
devicesChanged();
}

onShowDdWrtChanged: {
if (!inStart)
devicesChanged();
}

GridLayout {
columns: gridColumns
Expand All @@ -247,7 +256,7 @@ Item {
Layout.preferredHeight: height

Repeater {
model: networkDevicesModel
model: inStart ? 0 : networkDevicesModel
delegate: ActiveConnection {
Layout.preferredWidth: itemWidth
Layout.preferredHeight: itemHeight
Expand Down

0 comments on commit 964a950

Please sign in to comment.