r16338 by fschmid - Made ScribusDoc::itemSelectionSplitItems working more correct.

scribus-commit scribus-commit at lists.scribus.net
Sat Feb 5 12:39:06 CET 2011


Author: fschmid
Date: Sat Feb  5 11:39:06 2011
New Revision: 16338

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16338
Log:
Made ScribusDoc::itemSelectionSplitItems working more correct.

Modified:
    trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp
    trunk/Scribus/scribus/scribusdoc.cpp

Modified: trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16338&path=/trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp Sat Feb  5 11:39:06 2011
@@ -207,7 +207,7 @@
 			newItem->OldH2 = newItem->height();
 			newItem->updateClip();
 			newItem->ContourLine = newItem->PoLine.copy();
-			newItem->setFillEvenOdd(true);
+			newItem->setFillEvenOdd(false);
 			currDoc->m_Selection->addItem(newItem);
 		}
 		else
@@ -262,7 +262,7 @@
 					newItem->OldH2 = newItem->height();
 					newItem->updateClip();
 					newItem->ContourLine = newItem->PoLine.copy();
-					newItem->setFillEvenOdd(true);
+					newItem->setFillEvenOdd(false);
 					currDoc->m_Selection->addItem(newItem);
 				}
 			}

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16338&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Sat Feb  5 11:39:06 2011
@@ -12248,6 +12248,7 @@
 	uint StartInd = 0;
 	m_Selection->delaySignalsOn();
 	PageItem *currItem = m_Selection->itemAt(0);
+	int currItemNr = currItem->ItemNr;
 	uint EndInd = currItem->PoLine.size();
 	for (uint a = EndInd-1; a > 0; --a)
 	{
@@ -12255,8 +12256,9 @@
 		{
 			StartInd = a + 1;
 			bb = new PageItem_Polygon(*currItem);
-			Items->append(bb);
-			bb->ItemNr = Items->count()-1;
+			currItemNr++;
+			Items->insert(currItemNr, bb);
+			bb->ItemNr = currItemNr;
 			bb->convertTo(PageItem::Polygon);
 			bb->Frame = false;
 			bb->FrameType = 3;
@@ -12266,6 +12268,7 @@
 			AdjustItemSize(bb);
 			bb->ContourLine = bb->PoLine.copy();
 			bb->ClipEdited = true;
+			m_Selection->addItem(bb, false);
 			a -= 3;
 			EndInd = StartInd - 4;
 		}
@@ -12275,6 +12278,7 @@
 	currItem->ContourLine = currItem->PoLine.copy();
 	currItem->ClipEdited = true;
 	m_Selection->delaySignalsOff();
+	renumberItemsInListOrder();
 	//FIXME: stop using m_View
 	m_View->Deselect(true);
 	regionsChanged()->update(QRectF());




More information about the scribus-commit mailing list