r18962 by fschmid - Fixed Bug #12171: Temporarily enabled preview mode cannot be revoked
scribus-commit
scribus-commit at lists.scribus.net
Sun Mar 30 08:28:30 UTC 2014
Author: fschmid
Date: Sun Mar 30 08:28:30 2014
New Revision: 18962
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18962
Log:
Fixed Bug #12171: Temporarily enabled preview mode cannot be revoked
Docs saved in preview mode are now opened in proper preview mode
Modified:
trunk/Scribus/scribus/fileloader.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
trunk/Scribus/scribus/scribus.cpp
Modified: trunk/Scribus/scribus/fileloader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18962&path=/trunk/Scribus/scribus/fileloader.cpp
==============================================================================
--- trunk/Scribus/scribus/fileloader.cpp (original)
+++ trunk/Scribus/scribus/fileloader.cpp Sun Mar 30 08:28:30 2014
@@ -247,7 +247,7 @@
QList<FileFormat>::const_iterator it;
if (findFormat(FORMATID_SLA150EXPORT, it))
{
- it->setupTargets(doc, 0, doc->scMW(), doc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.fontPrefs.AvailFonts));
+ it->setupTargets(doc, doc->view(), doc->scMW(), doc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.fontPrefs.AvailFonts));
ret = it->saveFile(fileName);
if (savedFile)
*savedFile = it->lastSavedFile();
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18962&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Sun Mar 30 08:28:30 2014
@@ -2151,6 +2151,7 @@
doc->guidesPrefs().rulerMode = attrs.valueAsBool("rulerMode", true);
doc->guidesPrefs().rulersShown = attrs.valueAsBool("showrulers", true);
doc->guidesPrefs().showBleed = attrs.valueAsBool("showBleed", true);
+ m_Doc->drawAsPreview = attrs.valueAsBool("previewMode", true);
if (attrs.hasAttribute("MARGC"))
doc->guidesPrefs().marginColor = QColor(attrs.valueAsString("MARGC"));
if (attrs.hasAttribute("MINORC"))
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18962&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Sun Mar 30 08:28:30 2014
@@ -158,7 +158,6 @@
bool Scribus150Format::saveFile(const QString & fileName, const FileFormat & /* fmt */)
{
- QString text, tf, tf2, tc, tc2;
m_lastSavedFile = "";
// #11279: Image links get corrupted when symlinks involved
@@ -289,12 +288,21 @@
docu.writeAttribute("SHOWGRID", static_cast<int>(m_Doc->guidesPrefs().gridShown));
docu.writeAttribute("SHOWGUIDES", static_cast<int>(m_Doc->guidesPrefs().guidesShown));
docu.writeAttribute("showcolborders", static_cast<int>(m_Doc->guidesPrefs().colBordersShown));
- docu.writeAttribute("SHOWFRAME", static_cast<int>(m_Doc->guidesPrefs().framesShown));
+ docu.writeAttribute("previewMode", static_cast<int>(m_Doc->drawAsPreview));
+ if (m_Doc->drawAsPreview)
+ {
+ docu.writeAttribute("SHOWFRAME", static_cast<int>(m_View->storedFramesShown));
+ docu.writeAttribute("SHOWControl", static_cast<int>(m_View->storedShowControls));
+ }
+ else
+ {
+ docu.writeAttribute("SHOWFRAME", static_cast<int>(m_Doc->guidesPrefs().framesShown));
+ docu.writeAttribute("SHOWControl", static_cast<int>(m_Doc->guidesPrefs().showControls));
+ }
docu.writeAttribute("SHOWLAYERM", static_cast<int>(m_Doc->guidesPrefs().layerMarkersShown));
docu.writeAttribute("SHOWMARGIN", static_cast<int>(m_Doc->guidesPrefs().marginsShown));
docu.writeAttribute("SHOWBASE", static_cast<int>(m_Doc->guidesPrefs().baselineGridShown));
docu.writeAttribute("SHOWPICT", static_cast<int>(m_Doc->guidesPrefs().showPic));
- docu.writeAttribute("SHOWControl", static_cast<int>(m_Doc->guidesPrefs().showControls));
docu.writeAttribute("SHOWLINK", static_cast<int>(m_Doc->guidesPrefs().linkShown));
docu.writeAttribute("rulerMode", static_cast<int>(m_Doc->guidesPrefs().rulerMode));
docu.writeAttribute("showrulers", static_cast<int>(m_Doc->guidesPrefs().rulersShown));
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18962&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Sun Mar 30 08:28:30 2014
@@ -4137,6 +4137,8 @@
doc->NrItems = bookmarkPalette->BView->NrItems;
doc->First = bookmarkPalette->BView->First;
doc->Last = bookmarkPalette->BView->Last;
+ if (doc->drawAsPreview)
+ view->togglePreview();
}
else
{
@@ -6092,8 +6094,9 @@
{
if (!doc)
return;
-
- int i = (doc->appMode == modeEditClip) ? submodeEndNodeEdit : modeEditClip;
+ int i = modeEditClip;
+ if (doc->appMode == modeEditClip)
+ i = submodeEndNodeEdit;
view->requestMode(i);
}
More information about the scribus-commit
mailing list