r18270 by fschmid - Improvements for Thumbnail generation in the pic browser

scribus-commit scribus-commit at lists.scribus.net
Mon Apr 29 20:16:54 UTC 2013


Author: fschmid
Date: Mon Apr 29 20:16:54 2013
New Revision: 18270

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18270
Log:
Improvements for Thumbnail generation in the pic browser

Modified:
    trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
    trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp

Modified: trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18270&path=/trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp Mon Apr 29 20:16:54 2013
@@ -595,11 +595,11 @@
 			m_Doc->setPageOrientation(0);
 		m_Doc->setPageSize("Custom");
 	}
-	if (!(flags & LoadSavePlugin::lfLoadAsPattern))
+	if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
 		m_Doc->view()->Deselect();
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
-	if (!(flags & LoadSavePlugin::lfLoadAsPattern))
+	if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
 		m_Doc->view()->updatesOn(false);
 	m_Doc->scMW()->setScriptRunning(true);
 	qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -648,7 +648,8 @@
 				}
 				m_Doc->m_Selection->delaySignalsOff();
 				m_Doc->m_Selection->setGroupRect();
-				m_Doc->view()->updatesOn(true);
+				if (m_Doc->view() != NULL)
+					m_Doc->view()->updatesOn(true);
 			}
 			importCanceled = false;
 		}
@@ -685,7 +686,7 @@
 		m_Doc->setLoading(false);
 		m_Doc->changed();
 		m_Doc->reformPages();
-		if (!(flags & LoadSavePlugin::lfLoadAsPattern))
+		if ((!(flags & LoadSavePlugin::lfLoadAsPattern)) && (m_Doc->view() != NULL))
 			m_Doc->view()->updatesOn(true);
 		m_Doc->setLoading(loadF);
 	}

Modified: trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18270&path=/trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/wmf/wmfimportplugin.cpp Mon Apr 29 20:16:54 2013
@@ -133,7 +133,8 @@
 {
 	if (!checkFlags(flags))
 		return false;
-	m_Doc=ScCore->primaryMainWindow()->doc;
+	if (m_Doc == 0)
+		m_Doc = ScCore->primaryMainWindow()->doc;
 	ScribusMainWindow* mw=(m_Doc==0) ? ScCore->primaryMainWindow() : m_Doc->scMW();
 	if (filename.isEmpty())
 	{




More information about the scribus-commit mailing list