r17910 by fschmid - Faster switching from normal Display to Preview Mode and vice versa.
scribus-commit
scribus-commit at lists.scribus.net
Mon Nov 26 21:36:29 UTC 2012
Author: fschmid
Date: Mon Nov 26 21:36:28 2012
New Revision: 17910
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17910
Log:
Faster switching from normal Display to Preview Mode and vice versa.
Modified:
trunk/Scribus/scribus/scribusview.cpp
Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17910&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Mon Nov 26 21:36:28 2012
@@ -430,6 +430,7 @@
m_canvas->m_viewMode.viewAsPreview = !m_canvas->m_viewMode.viewAsPreview;
Doc->drawAsPreview = m_canvas->m_viewMode.viewAsPreview;
m_ScMW->propertiesPalette->setEnabled(!m_canvas->m_viewMode.viewAsPreview);
+ bool recalc = false;
if (m_canvas->m_viewMode.viewAsPreview)
{
storedFramesShown = Doc->guidesPrefs().framesShown;
@@ -448,6 +449,8 @@
Doc->guidesPrefs().framesShown = storedFramesShown;
Doc->guidesPrefs().showControls = storedShowControls;
disconnect(visualMenu, SIGNAL(activated(int)), this, SLOT(switchPreviewVisual(int)));
+ if (visualMenu->currentIndex() != Doc->previewVisual)
+ recalc = true;
m_canvas->m_viewMode.previewVisual = 0;
Doc->previewVisual = 0;
visualMenu->setCurrentIndex(0);
@@ -469,8 +472,11 @@
#endif
visualMenu->setEnabled(m_canvas->m_viewMode.viewAsPreview);
ScGuardedPtr<ScribusDoc> docPtr = Doc->guardedPtr();
- Doc->recalculateColors();
- Doc->recalcPicturesRes();
+ if (recalc)
+ {
+ Doc->recalculateColors();
+ Doc->recalcPicturesRes();
+ }
// repaintContents(QRect());
if (docPtr) // document may have been destroyed in-between
{
More information about the scribus-commit
mailing list