File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ struct ExporterBase : public Component
3131
3232 bool validPatchSelected = false;
3333 bool canvasDirty = false;
34+ bool isTempFile = false;
3435
3536 File patchFile ;
3637 File openedPatchFile ;
@@ -95,6 +96,7 @@ struct ExporterBase : public Component
9596 realPatchFile = patchFile ;
9697 patchFile = openedPatchFile ;
9798 canvasDirty = false;
99+ isTempFile = true;
98100 }
99101 else {
100102 canvasDirty = cnv -> patch .isDirty ();
@@ -121,14 +123,14 @@ struct ExporterBase : public Component
121123 },
122124 "" , "HeavyExport" , nullptr , true);
123125 };
124-
126+
125127 unsavedLabel .setColour (Label ::textColourId , Colours ::orange );
126128 addChildComponent (unsavedLabel );
127129 }
128130
129131 ~ExporterBase () override
130132 {
131- if (openedPatchFile .existsAsFile ()) {
133+ if (openedPatchFile .existsAsFile () && isTempFile ) {
132134 openedPatchFile .deleteFile ();
133135 }
134136
You can’t perform that action at this time.
0 commit comments