r20926 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Sun Feb 7 00:27:40 UTC 2016


Author: jghali
Date: Sun Feb  7 00:27:40 2016
New Revision: 20926

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20926
Log:
coverity #1350741: uninitialized scalar field

Modified:
    trunk/Scribus/scribus/ui/guidemanager.cpp

Modified: trunk/Scribus/scribus/ui/guidemanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20926&path=/trunk/Scribus/scribus/ui/guidemanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/guidemanager.cpp	(original)
+++ trunk/Scribus/scribus/ui/guidemanager.cpp	Sun Feb  7 00:27:40 2016
@@ -44,6 +44,8 @@
 		currentPage(0),
 		m_drawGuides(true)
 {
+	docUnitIndex = 0;
+
 	setupUi(this);
 	tabWidget->setEnabled(false);
 	horizontalAutoGapSpin->setMinimum(0.0);
@@ -103,7 +105,13 @@
 
 void GuideManager::setDoc(ScribusDoc* doc)
 {
-	m_Doc=doc;
+	m_Doc = doc;
+	if (m_Doc)
+	{
+		docUnitIndex = m_Doc->unitIndex();
+		suffix = unitGetSuffixFromIndex(docUnitIndex);
+	}
+
 	qobject_cast<GuidesHDelegate*>(horizontalView->itemDelegateForColumn(0))->setDoc(doc);
 	qobject_cast<GuidesVDelegate*>(verticalView->itemDelegateForColumn(0))->setDoc(doc);
 	if (!m_Doc)




More information about the scribus-commit mailing list