--- a/src/hugin1/hugin/PanoPanel.cpp
+++ b/src/hugin1/hugin/PanoPanel.cpp
@@ -1057,7 +1057,10 @@
             return;
     };
 
-    wxString command = hugin_stitch_project + wxT(" --delete -o ") + wxQuoteFilename(dlg.GetPath()) + wxT(" ") + wxQuoteFilename(currentPTOfn);
+    wxString switches(wxT(" --delete -o "));
+    if(wxConfigBase::Get()->Read(wxT("/Processor/overwrite"), HUGIN_PROCESSOR_OVERWRITE) == 1)
+        switches=wxT(" --overwrite")+switches;
+    wxString command = hugin_stitch_project + switches + wxQuoteFilename(dlg.GetPath()) + wxT(" ") + wxQuoteFilename(currentPTOfn);
     
     wxConfigBase::Get()->Flush();
 #ifdef __WXGTK__