File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,15 @@ import Machinekit.PathView 1.0
2626import Machinekit.Application 1.0
2727
2828ApplicationItem {
29+ /* ! If this property is set to \c{true}, the preview loads automatically when
30+ the remote program is changed.
31+ In some cases it might be preferred to update the preview manually, this can
32+ be done using the \l updatePreview function.
33+
34+ The default value is \c{true}.
35+ */
36+ property bool autoPreview: true
37+
2938 property alias gcodeProgramModel: gcodeProgramModel
3039 property alias gcodeProgramLoader: gcodeProgramLoader
3140 property alias previewClient: previewClient
@@ -87,7 +96,8 @@ ApplicationItem {
8796 if (previewEnabled
8897 && (file .remoteFilePath !== " " )
8998 && (file .localFilePath !== " " )
90- && (file .transferState === ApplicationFile .NoTransfer ))
99+ && (file .transferState === ApplicationFile .NoTransfer )
100+ && autoPreview)
91101 {
92102 executePreview ();
93103 }
@@ -96,7 +106,7 @@ ApplicationItem {
96106 function reloadModelAndPreview () {
97107 gcodeProgramModel .clear ();
98108 gcodeProgramLoader .load ();
99- if (previewEnabled) {
109+ if (previewEnabled && autoPreview ) {
100110 executePreview ();
101111 }
102112 }
You can’t perform that action at this time.
0 commit comments