AniMax don't overwrite existing images

This commit is contained in:
Nathan Fulton 2017-04-25 23:39:36 -04:00
parent ae45c7539f
commit 948f2e2417

View File

@ -181,12 +181,15 @@ namespace SpiffCode
if (strFileName == null) {
strFileName = m_strFileName;
}
m_bm.Save(strFileName);
if (!System.IO.File.Exists(strFileName))
m_bm.Save(strFileName);
if (m_bmBlack != null) {
string strPath = Path.GetDirectoryName(strFileName);
string strFileT = Path.GetFileName(strFileName);
m_bmBlack.Save(Path.Combine(strPath, "black_" + strFileT));
string strBlackPath = Path.Combine(strPath, "black_" + strFileT);
if (!System.IO.File.Exists(strBlackPath))
m_bmBlack.Save(strBlackPath);
}
m_fDirty = false;