r16294 by fschmid - Fixed crash in Node edit mode when polygon has only 3 points and "Delete Point" was tried.

scribus-commit scribus-commit at lists.scribus.net
Sat Jan 22 23:36:04 CET 2011


Author: fschmid
Date: Sat Jan 22 22:36:04 2011
New Revision: 16294

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16294
Log:
Fixed crash in Node edit mode when polygon has only 3 points and "Delete Point" was tried.

Modified:
    trunk/Scribus/scribus/canvasmode_nodeedit.cpp

Modified: trunk/Scribus/scribus/canvasmode_nodeedit.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16294&path=/trunk/Scribus/scribus/canvasmode_nodeedit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_nodeedit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_nodeedit.cpp Sat Jan 22 22:36:04 2011
@@ -934,15 +934,21 @@
 	{
 		if (!m_doc->nodeEdit.EdPoints)
 			return;
-		if ((currItem->asPolygon()) || (currItem->asTextFrame()) || (currItem->asImageFrame()))
+		if (!(currItem->isLine() || currItem->isPathText() || currItem->isPolyLine()))
 		{
 			if ((currItem->Segments.count() == 0) && (Clip.size() <= 12))  // min. 3 points
+			{
+				m_doc->nodeEdit.deselect();
 				return;
+			}
 		}
 		else
 		{
 			if (Clip.size() <= 4)
+			{
+				m_doc->nodeEdit.deselect();
 				return;
+			}
 		}
 		if ((currItem->Segments.count() != 0) && ((EndInd - StartInd) <= 12))
 		{
@@ -954,7 +960,7 @@
 		{
 			if (m_doc->nodeEdit.ClRe == static_cast<int>(StartInd))
 			{
-				if ((currItem->asPolygon()) || (currItem->asTextFrame()) || (currItem->asImageFrame()))
+				if (!(currItem->isLine() || currItem->isPathText() || currItem->isPolyLine()))
 				{
 					FPoint kp(Clip.point(EndInd-3));
 					cli.putPoints(0, StartInd, Clip);




More information about the scribus-commit mailing list