r21823 by craig - Rework to reduce indentation
scribus-commit
scribus-commit at lists.scribus.net
Mon Mar 13 20:27:05 UTC 2017
Author: craig
Date: Mon Mar 13 20:27:05 2017
New Revision: 21823
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21823
Log:
Rework to reduce indentation
Modified:
trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp
Modified: trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21823&path=/trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp (original)
+++ trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp Mon Mar 13 20:27:05 2017
@@ -148,30 +148,29 @@
QString docName = docPath.right(docPath.length() - docPath.lastIndexOf('/') - 1);
docName = docName.left(docName.lastIndexOf(".s"));
- if (currentFile != doc->DocName)
- {
- SATDialog* satdia = new SATDialog(doc->scMW(),docName,
- static_cast<int>(doc->pageWidth() + 0.5),
- static_cast<int>(doc->pageHeight() + 0.5));
- if (satdia->exec())
- {
- sat* s = new sat(doc, satdia, docPath.right(docPath.length() - docPath.lastIndexOf('/') - 1),docDir);
- s->createImages();
- s->createTmplXml();
- delete s;
- }
- // Restore the state that was before ScMW->Collect()
- doc->DocName = currentFile;
- doc->hasName = hasName;
- doc->setModified(isModified);
- QString newCaption=currentFile;
- if (isModified)
- newCaption.append('*');
- doc->scMW()->updateActiveWindowCaption(newCaption);
- doc->scMW()->removeRecent(docPath);
- QDir::setCurrent(currentPath);
- delete satdia;
- }
+ if (currentFile == doc->DocName)
+ return;
+ SATDialog* satdia = new SATDialog(doc->scMW(),docName,
+ static_cast<int>(doc->pageWidth() + 0.5),
+ static_cast<int>(doc->pageHeight() + 0.5));
+ if (satdia->exec())
+ {
+ sat* s = new sat(doc, satdia, docPath.right(docPath.length() - docPath.lastIndexOf('/') - 1),docDir);
+ s->createImages();
+ s->createTmplXml();
+ delete s;
+ }
+ // Restore the state that was before ScMW->Collect()
+ doc->DocName = currentFile;
+ doc->hasName = hasName;
+ doc->setModified(isModified);
+ QString newCaption=currentFile;
+ if (isModified)
+ newCaption.append('*');
+ doc->scMW()->updateActiveWindowCaption(newCaption);
+ doc->scMW()->removeRecent(docPath);
+ QDir::setCurrent(currentPath);
+ delete satdia;
}
// --------------------- CLASS sat ------------------------------------------------//
More information about the scribus-commit
mailing list