r20143 by jghali - #13101: Crash after opening document with preview mode ON
scribus-commit
scribus-commit at lists.scribus.net
Tue Jun 2 18:14:38 UTC 2015
Author: jghali
Date: Tue Jun 2 18:14:38 2015
New Revision: 20143
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20143
Log:
#13101: Crash after opening document with preview mode ON
Modified:
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusview.cpp
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20143&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Tue Jun 2 18:14:38 2015
@@ -3457,6 +3457,11 @@
if (docFontDir3.exists())
prefsManager->appPrefs.fontPrefs.AvailFonts.AddScalableFonts(fi.absolutePath()+"/Document fonts", FName);
prefsManager->appPrefs.fontPrefs.AvailFonts.updateFontMap();
+ if (view != NULL)
+ {
+ actionManager->disconnectNewViewActions();
+ disconnect(view, SIGNAL(signalGuideInformation(int, qreal)), alignDistributePalette, SLOT(setGuide(int, qreal)));
+ }
doc=new ScribusDoc();
doc->saveFilePermissions(QFile::permissions(fileName));
doc->is12doc=is12doc;
Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20143&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Tue Jun 2 18:14:38 2015
@@ -206,8 +206,6 @@
setRulersShown(Doc->guidesPrefs().rulersShown);
m_canvas->m_viewMode.viewAsPreview = false;
m_canvas->setPreviewVisual(-1);
-// shiftSelItems = false;
-// inItemCreation = false;
m_previousMode = -1;
redrawMode = 0;
redrawCount = 0;
@@ -215,8 +213,10 @@
redrawMarker->hide();
m_canvas->newRedrawPolygon();
m_canvas->resetRenderMode();
- m_ScMW->scrActions["viewPreviewMode"]->setChecked(m_canvas->m_viewMode.viewAsPreview);
-// m_SnapCounter = 0;
+// #13101 : "viewPreviewMode" is checked if necessary in ScribusMainWindow::newActWin()
+// At this point the view and parent window may not be able to perform all what is necessary to
+// enable preview mode anyway, especially when loading an existing doc.
+// m_ScMW->scrActions["viewPreviewMode"]->setChecked(m_canvas->m_viewMode.viewAsPreview);
m_mousePointDoc = FPoint(0,0);
Doc->regionsChanged()->connectObserver(this);
connect(this, SIGNAL(HaveSel()), Doc, SLOT(selectionChanged()));
@@ -4343,7 +4343,6 @@
m_canvas->m_viewMode.m_MouseButtonPressed = false;
m_canvas->m_viewMode.operItemMoving = false;
m_canvas->m_viewMode.operItemResizing = false;
-//FIXME:av inItemCreation = false;
MidButt = false;
}
More information about the scribus-commit
mailing list