Mercurial > hg > svapp
changeset 225:9d50c42d7ca0 templating
Don't add templates to Recent Files
author | Chris Cannam |
---|---|
date | Tue, 10 May 2011 19:37:45 +0100 |
parents | 46213a34900f |
children | 2c827ac7c8e7 |
files | framework/MainWindowBase.cpp |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp Tue May 10 13:58:08 2011 +0100 +++ b/framework/MainWindowBase.cpp Tue May 10 19:37:45 2011 +0100 @@ -1595,6 +1595,7 @@ QXmlInputSource *inputSource = 0; BZipFileDevice *bzFile = 0; QFile *rawFile = 0; + bool isTemplate = false; if (source.getExtension().toLower() == "sv") { bzFile = new BZipFileDevice(source.getLocalFilename()); @@ -1604,6 +1605,9 @@ } inputSource = new QXmlInputSource(bzFile); } else { + if (source.getExtension().toLower() == "svt") { + isTemplate = true; + } rawFile = new QFile(source.getLocalFilename()); inputSource = new QXmlInputSource(rawFile); } @@ -1662,7 +1666,9 @@ m_documentModified = false; updateMenuStates(); - m_recentFiles.addFile(source.getLocation()); + if (!isTemplate) { + m_recentFiles.addFile(source.getLocation()); + } if (!source.isRemote()) { // for file dialog