r14084 by fschmid - Fixed crash when using "Put to Patterns" and there are Lines in the Selection.

scribus-commit scribus-commit at lists.scribus.net
Fri Oct 2 12:10:19 CEST 2009


Revision: 14084
Author: fschmid
Date: 2009-10-02T10:08:21.906547Z
Commit message: Fixed crash when using "Put to Patterns" and there are Lines in the Selection.

Changeset: 
M  /trunk/Scribus/scribus/ui/propertiespalette.cpp
M  /trunk/Scribus/scribus/scribus.cpp

Diffs:
Index: scribus/ui/propertiespalette.cpp
===================================================================
--- scribus/ui/propertiespalette.cpp	(revision 14083)
+++ scribus/ui/propertiespalette.cpp	(revision 14084)
@@ -2484,10 +2484,14 @@
 		yposLabel->setText( tr( "&Y-Pos:" ) );
 		heightLabel->setText( tr( "&Height:" ) );
 		HaveItem = false;
-		Xpos->setValue(0);
-		Ypos->setValue(0);
-		Width->setValue(0);
-		Height->setValue(0);
+//		Xpos->setValue(0);
+//		Ypos->setValue(0);
+//		Width->setValue(0);
+//		Height->setValue(0);
+		Xpos->setValue(gx);
+		Ypos->setValue(gy);
+		Width->setValue(gw);
+		Height->setValue(gh);
 		Rotation->setValue(0);
 		RoundRect->setValue(0);
 		HaveItem = true;
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp	(revision 14083)
+++ scribus/scribus.cpp	(revision 14084)
@@ -5283,6 +5283,11 @@
 				}
 				doc->m_Selection->delaySignalsOff();
 				int docSelectionCount=doc->m_Selection->count();
+				if (docSelectionCount > 0)
+				{
+					doc->m_Selection->itemAt(0)->connectToGUI();
+					doc->m_Selection->itemAt(0)->emitAllToGUI();
+				}
 				if (docSelectionCount > 1)
 				{
 					doc->m_Selection->setGroupRect();
@@ -5371,6 +5376,11 @@
 		}
 		doc->m_Selection->delaySignalsOff();
 		int docSelectionCount = doc->m_Selection->count();
+		if (docSelectionCount > 0)
+		{
+			doc->m_Selection->itemAt(0)->connectToGUI();
+			doc->m_Selection->itemAt(0)->emitAllToGUI();
+		}
 		if (docSelectionCount > 1)
 		{
 			double x, y, w, h;
@@ -5433,6 +5443,11 @@
 		}
 		doc->m_Selection->delaySignalsOff();
 		int docSelectionCount=doc->m_Selection->count();
+		if (docSelectionCount > 0)
+		{
+			doc->m_Selection->itemAt(0)->connectToGUI();
+			doc->m_Selection->itemAt(0)->emitAllToGUI();
+		}
 		if (docSelectionCount > 1)
 		{
 			double x, y, w, h;




More information about the scribus-commit mailing list