r17101 by jghali - merge trunk revisions up to r17100

scribus-commit scribus-commit at lists.scribus.net
Mon Dec 19 23:22:37 UTC 2011


Author: jghali
Date: Mon Dec 19 23:22:37 2011
New Revision: 17101

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17101
Log:
merge trunk revisions up to r17100

Modified:
    branches/ScribusOIF/scribus/canvasgesture_resize.cpp
    branches/ScribusOIF/scribus/canvasmode.cpp
    branches/ScribusOIF/scribus/pageitem.cpp
    branches/ScribusOIF/scribus/pageitem.h
    branches/ScribusOIF/scribus/pdflib_core.cpp
    branches/ScribusOIF/scribus/pslib.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette.h
    branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_group.h
    branches/ScribusOIF/scribus/ui/propertiespalette_image.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_image.h
    branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_line.h
    branches/ScribusOIF/scribus/ui/propertiespalette_shape.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_shape.h
    branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_text.h
    branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_xyz.h
    branches/ScribusOIF/scribus/ui/propertywidget_distance.cpp

Modified: branches/ScribusOIF/scribus/canvasgesture_resize.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/canvasgesture_resize.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasgesture_resize.cpp (original)
+++ branches/ScribusOIF/scribus/canvasgesture_resize.cpp Mon Dec 19 23:22:37 2011
@@ -73,7 +73,17 @@
 		m.scale(m_scaleX, m_scaleY);
 		m_bounds = m.mapRect(m_bounds);
 		m_bounds.moveTopLeft(itPos);
-		m_rotation = -getRotationDFromMatrix(mm);
+		if (mm.m11() < 0)
+		{
+			m_rotation = -getRotationDFromMatrix(mm) - 180.0;
+			m_bounds.translate(-currItem->visualWidth() * m_scaleX, 0);
+		}
+		else
+			m_rotation = -getRotationDFromMatrix(mm);
+		if (mm.m22() < 0)
+		{
+			m_bounds.translate(0, -currItem->visualHeight() * m_scaleY);
+		}
 		currItem->OldB2 = currItem->width();
 		currItem->OldH2 = currItem->height();
 		m_extraWidth = currItem->visualWidth() - currItem->width();
@@ -126,19 +136,35 @@
 	drawColor.setAlpha(64);
 	p->setBrush(drawColor);
 	p->drawRect(localRect);
+
+	if (m_origBounds != m_bounds)
+	{
+		if (m_doc->m_Selection->count() > 0)
+		{
+			p->setBrush(Qt::NoBrush);
+			QPen out = QPen(Qt::gray, 1.0 , Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+			out.setCosmetic(true);
+			p->setPen(out);
+			PageItem *currItem = m_doc->m_Selection->itemAt(0);
+			QTransform m;
+			m.translate(localRect.x(), localRect.y());
+			m.scale(localRect.width() / currItem->width(), localRect.height() / currItem->height());
+			QTransform mm = currItem->getTransform();
+			if (mm.m11() < 0)
+			{
+				m.translate(currItem->width(), 0);
+				m.scale(-1, 1);
+			}
+			if (mm.m22() < 0)
+			{
+				m.translate(0, currItem->height());
+				m.scale(1, -1);
+			}
+			QPolygon clip = m.map(currItem->Clip);
+			currItem->DrawPolyL(p, clip);
+		}
+	}
 	p->restore();
-
-	if (m_origBounds != m_bounds)
-	{
-		QRectF n_bounds = m_bounds.normalized();
-		QRectF n_origBounds = m_origBounds.normalized();
-		p->save();
-		drawOutline(p, qAbs(n_bounds.width()) / qMax(qAbs(n_origBounds.width()), static_cast<qreal>(1.0)), 
-					qAbs(n_bounds.height()) / qMax(qAbs(n_origBounds.height()), static_cast<qreal>(1.0)),
-					n_bounds.left() - n_origBounds.left(),
-					n_bounds.top() - n_origBounds.top());
-		p->restore();
-	}
 }
 
 
@@ -319,6 +345,10 @@
 		currItem->moveBy(-dx, -dy, true);
 		currItem->setWidth(newBounds.width() / m_scaleX - m_extraWidth);
 		currItem->setHeight(newBounds.height() / m_scaleY - m_extraHeight);
+		if (mm.m11() < 0)
+			currItem->moveBy(-currItem->width(), 0);
+		if (mm.m22() < 0)
+			currItem->moveBy(0, -currItem->height());
 		currItem->updateClip();
 		if (currItem->isArc())
 		{
@@ -592,6 +622,60 @@
 	else
 	{
 		m_handle = m_canvas->frameHitTest(QPointF(point.x(), point.y()), m_doc->m_Selection->itemAt(0));
+		PageItem* currItem = m_doc->m_Selection->itemAt(0);
+		QTransform mm = currItem->getTransform();
+		if (mm.m11() < 0)
+		{
+			switch (m_handle)
+			{
+				case Canvas::NORTHEAST:
+					m_handle = Canvas::NORTHWEST;
+					break;
+				case Canvas::NORTHWEST:
+					m_handle = Canvas::NORTHEAST;
+					break;
+				case Canvas::EAST:
+					m_handle = Canvas::WEST;
+					break;
+				case Canvas::WEST:
+					m_handle = Canvas::EAST;
+					break;
+				case Canvas::SOUTHEAST:
+					m_handle = Canvas::SOUTHWEST;
+					break;
+				case Canvas::SOUTHWEST:
+					m_handle = Canvas::SOUTHEAST;
+					break;
+				default:
+					break;
+			}
+		}
+		if (mm.m22() < 0)
+		{
+			switch (m_handle)
+			{
+				case Canvas::NORTHEAST:
+					m_handle = Canvas::SOUTHEAST;
+					break;
+				case Canvas::NORTHWEST:
+					m_handle = Canvas::SOUTHWEST;
+					break;
+				case Canvas::SOUTH:
+					m_handle = Canvas::NORTH;
+					break;
+				case Canvas::NORTH:
+					m_handle = Canvas::SOUTH;
+					break;
+				case Canvas::SOUTHEAST:
+					m_handle = Canvas::SOUTHWEST;
+					break;
+				case Canvas::SOUTHWEST:
+					m_handle = Canvas::NORTHWEST;
+					break;
+				default:
+					break;
+			}
+		}
 	}
 	if (m_handle > 0)
 	{

Modified: branches/ScribusOIF/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/canvasmode.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode.cpp Mon Dec 19 23:22:37 2011
@@ -454,8 +454,16 @@
 			QPointF itPos = itemTrans.map(QPointF(0, 0));
 			double gRot = getRotationDFromMatrix(itemTrans);
 			double m_scaleX, m_scaleY;
+			double addTransX = 0.0;
 			getScaleFromMatrix(itemTrans, m_scaleX, m_scaleY);
 			p->translate(itPos);
+			if (itemTrans.m11() < 0)
+			{
+				gRot -= 180.0;
+		//		p->translate(-currItem->visualWidth(), 0);
+		//		addTransX = -currItem->visualWidth() * (scalex * m_scaleX);
+		//		m_scaleX *= -1;
+			}
 			p->translate(deltax, deltay);
 			if (gRot != 0)
 			{
@@ -463,6 +471,7 @@
 				p->rotate(-gRot);
 			}
 			p->scale(scalex * m_scaleX, scaley * m_scaleY);
+			p->translate(addTransX, 0);
 			currItem->DrawPolyL(p, currItem->Clip);
 		}
 		else // moving page item

Modified: branches/ScribusOIF/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/pageitem.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem.cpp Mon Dec 19 23:22:37 2011
@@ -1090,6 +1090,11 @@
 	if (frameOverflows())
 		return itemText.length() - (lastInFrame() + 1);
 	return 0;
+}
+
+int PageItem::maxCharsInFrame()
+{
+	return lastInFrame();
 }
 
 /// returns true if text is ending before that frame
@@ -5578,21 +5583,21 @@
 		}
 		result.translate(ite->xPos(), ite->yPos());
 		result.rotate(ite->rotation());
+		if (ite->isGroup() || ite->isSymbol())
+		{
+			if (ite->imageFlippedH())
+			{
+				result.translate(ite->width(), 0);
+				result.scale(-1, 1);
+			}
+			if (ite->imageFlippedV())
+			{
+				result.translate(0, ite->height());
+				result.scale(1, -1);
+			}
+		}
 		if (ite == this)
 			return result;
-		if (ite->isGroup() || ite->isSymbol())
-		{
-			if (ite->imageFlippedH())
-			{
-				result.translate(ite->width(), 0);
-				result.scale(-1, 1);
-			}
-			if (ite->imageFlippedV())
-			{
-				result.translate(0, ite->height());
-				result.scale(1, -1);
-			}
-		}
 		if (ite->isGroup())
 			result.scale(ite->width() / ite->groupWidth, ite->height() / ite->groupHeight);
 		for (int aa = 0; aa < itList.count(); aa++)
@@ -5600,8 +5605,6 @@
 			ite = itList.at(aa);
 			result.translate(ite->gXpos, ite->gYpos);
 			result.rotate(ite->rotation());
-			if (ite == this)
-				return result;
 			if (ite->isGroup() || ite->isSymbol())
 			{
 				if (ite->imageFlippedH())
@@ -5615,6 +5618,8 @@
 					result.scale(1, -1);
 				}
 			}
+			if (ite == this)
+				return result;
 			if (ite->isGroup())
 				result.scale(ite->width() / ite->groupWidth, ite->height() / ite->groupHeight);
 		}

Modified: branches/ScribusOIF/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/pageitem.h
==============================================================================
--- branches/ScribusOIF/scribus/pageitem.h (original)
+++ branches/ScribusOIF/scribus/pageitem.h Mon Dec 19 23:22:37 2011
@@ -364,6 +364,7 @@
 	virtual void layout() {}
 	/// returns frame where is text end
 	PageItem * frameTextEnd();
+	int maxCharsInFrame();
 	/// returns true if text overflows
 	bool frameOverflows() const;
 	bool frameUnderflows() const;

Modified: branches/ScribusOIF/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/pdflib_core.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pdflib_core.cpp (original)
+++ branches/ScribusOIF/scribus/pdflib_core.cpp Mon Dec 19 23:22:37 2011
@@ -4874,7 +4874,7 @@
 		ite->asPathText()->layout();
 		ite->OwnPage = savedOwnPage;
 		double CurX = 0;
-		for (int d = 0; d < ite->asPathText()->itemRenderText.length(); ++d)
+		for (int d = 0; d < ite->maxCharsInFrame(); ++d)
 		{
 			const ScText * const hl = ite->asPathText()->itemRenderText.item(d);
 			const QChar ch = hl->ch;
@@ -5382,8 +5382,6 @@
 					}
 					else
 					{
-						if (ite->BaseOffs != 0)
-							tmp2 += "1 0 0 1 0 "+FToStr( -ite->BaseOffs)+" cm\n";
 						tmp2 += FToStr(tsz / 10.0)+" 0 0 "+FToStr(tsz / 10.0)+" 0 "+FToStr(tsz / 10.0)+" cm\n";
 					}
 					if (hl->glyph.scaleV != 1.0)

Modified: branches/ScribusOIF/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/pslib.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pslib.cpp (original)
+++ branches/ScribusOIF/scribus/pslib.cpp Mon Dec 19 23:22:37 2011
@@ -2202,7 +2202,7 @@
 			c->OwnPage = PNr-1;
 			c->asPathText()->layout();
 			c->OwnPage = savedOwnPage;
-			for (d = 0; d < c->asPathText()->itemRenderText.length(); ++d)
+			for (d = 0; d < c->maxCharsInFrame(); ++d)
 			{
 				hl = c->asPathText()->itemRenderText.item(d);
 				const CharStyle & style(c->asPathText()->itemRenderText.charStyle(d));
@@ -2961,7 +2961,7 @@
 				ite->OwnPage = PNr;
 				ite->asPathText()->layout();
 				ite->OwnPage = savedOwnPage;
-				for (d = 0; d < ite->asPathText()->itemRenderText.length(); ++d)
+				for (d = 0; d < ite->maxCharsInFrame(); ++d)
 				{
 					hl = ite->asPathText()->itemRenderText.item(d);
 					const CharStyle & style(ite->asPathText()->itemRenderText.charStyle(d));

Modified: branches/ScribusOIF/scribus/ui/propertiespalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/ui/propertiespalette.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette.cpp Mon Dec 19 23:22:37 2011
@@ -243,7 +243,6 @@
 	this->textPal->setMainWindow(mw);
 	this->tablePal->setMainWindow(mw);
 
-	connect(this, SIGNAL(DocChanged()), m_ScMW, SLOT(slotDocCh()));
 	//connect(this->Cpal, SIGNAL(gradientChanged()), m_ScMW, SLOT(updtGradFill()));
 	//connect(this->Cpal, SIGNAL(strokeGradientChanged()), m_ScMW, SLOT(updtGradStroke()));
 	connect(this->Tpal, SIGNAL(gradientChanged()), this, SLOT(handleGradientChanged()));
@@ -786,7 +785,7 @@
 		}
 		upRect.translate(m_item->xPos(), m_item->yPos());
 		m_doc->regionsChanged()->update(upRect.adjusted(-10.0, -10.0, 10.0, 10.0));
-		emit DocChanged();
+		m_doc->changed();
 	}
 }
 
@@ -859,7 +858,7 @@
 		upRect |= QRectF(shP, QPointF(m_item->width(), m_item->height())).normalized();
 		upRect.translate(m_item->xPos(), m_item->yPos());
 		m_doc->regionsChanged()->update(upRect.adjusted(-10.0, -10.0, 10.0, 10.0));
-		emit DocChanged();
+		m_doc->changed();
 	}
 }
 

Modified: branches/ScribusOIF/scribus/ui/propertiespalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/ui/propertiespalette.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette.h Mon Dec 19 23:22:37 2011
@@ -111,9 +111,6 @@
 	void toggleGradientEditM();
 	void handleShapeEdit();
 
-signals:
-	void DocChanged();
-
 protected:
 	ScribusMainWindow *m_ScMW;
 

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_group.cpp Mon Dec 19 23:22:37 2011
@@ -128,7 +128,6 @@
 	m_ScMW = mw;
 
 	connect(this->transPalWidget, SIGNAL(gradientChanged()), this, SLOT(handleGradientChanged()));
-	connect(this                , SIGNAL(DocChanged())     , m_ScMW, SLOT(slotDocCh()));
 	connect(m_ScMW, SIGNAL(UpdateRequest(int)), this, SLOT(handleUpdateRequest(int)));
 }
 
@@ -415,7 +414,6 @@
 	{
 		m_item->setFillTransparency(trans);
 		m_item->update();
-		emit DocChanged();
 	}
 }
 
@@ -425,7 +423,6 @@
 	{
 		m_item->setFillBlendmode(blend);
 		m_item->update();
-		emit DocChanged();
 	}
 }
 
@@ -437,7 +434,6 @@
 		if ((typ > 0) && (typ < 7))
 			m_item->updateGradientVectors();
 		m_item->update();
-		emit DocChanged();
 	}
 }
 
@@ -447,7 +443,6 @@
 	{
 		m_item->setPatternMask(pattern);
 		m_item->update();
-		emit DocChanged();
 	}
 }
 
@@ -458,7 +453,6 @@
 		m_item->setMaskTransform(imageScaleX, imageScaleY, offsetX, offsetY, rotation, skewX, skewY);
 		m_item->setMaskFlip(mirrorX, mirrorY);
 		m_item->update();
-		emit DocChanged();
 	}
 }
 
@@ -472,6 +466,8 @@
 			return;
 
 		m_doc->item_setFrameShape(m_item, frameType, count, points);
+		m_doc->invalidateAll();
+		m_doc->regionsChanged()->update(QRect());
 
 		//ScribusDoc::changed() is called in item_setFrameShape()
 		//Hope this is enough
@@ -501,7 +497,7 @@
 				mode = PageItem::TextFlowUsesImageClipping;
 		}
 		m_item->setTextFlowMode(mode);
-		emit DocChanged();
+		m_doc->changed();
 		m_doc->invalidateAll();
 		m_doc->regionsChanged()->update(QRect());
 	}
@@ -558,7 +554,7 @@
 		upRect |= QRectF(shP, QPointF(m_item->width(), m_item->height())).normalized();
 		upRect.translate(m_item->xPos(), m_item->yPos());
 		m_doc->regionsChanged()->update(upRect.adjusted(-10.0, -10.0, 10.0, 10.0));
-		emit DocChanged();
+		m_doc->changed();
 	}
 }
 
@@ -568,7 +564,6 @@
 		return;
 	m_item->fillRule = evenOdd->isChecked();
 	m_item->update();
-	emit DocChanged();
 }
 
 void PropertiesPalette_Group::handleShapeEdit()

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_group.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/ui/propertiespalette_group.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_group.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_group.h Mon Dec 19 23:22:37 2011
@@ -83,7 +83,6 @@
 	void handleGradientEdit();
 
 signals:
-	void DocChanged();
 	void shapeChanged(int);
 	void shapeEditStarted();
 };

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_image.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/ui/propertiespalette_image.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_image.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_image.cpp Mon Dec 19 23:22:37 2011
@@ -122,7 +122,6 @@
 {
 	m_ScMW = mw;
 
-	connect(this  , SIGNAL(DocChanged())      , m_ScMW, SLOT(slotDocCh()));
 	connect(m_ScMW, SIGNAL(UpdateRequest(int)), this  , SLOT(handleUpdateRequest(int)));
 }
 
@@ -585,8 +584,8 @@
 	if ((m_haveDoc) && (m_haveItem))
 	{
 		m_item->setImageScalingMode(freeScale->isChecked(), cbProportional->isChecked());
+		m_doc->changed();
 		emit UpdtGui(PageItem::ImageFrame);
-		emit DocChanged();
 	}
 }
 
@@ -682,7 +681,7 @@
 	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	m_ScMW->view->editExtendedImageProperties();
-	emit DocChanged();
+	m_doc->changed();
 }
 
 void PropertiesPalette_Image::handleImagePageNumber()

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_image.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/ui/propertiespalette_image.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_image.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_image.h Mon Dec 19 23:22:37 2011
@@ -103,7 +103,6 @@
 	void handleExtImgProperties();
 
 signals:
-	void DocChanged();
 	void UpdtGui(int);
 };
 

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp Mon Dec 19 23:22:37 2011
@@ -122,7 +122,6 @@
 {
 	m_ScMW = mw;
 
-	connect(this  , SIGNAL(DocChanged())      , m_ScMW, SLOT(slotDocCh()));
 	connect(m_ScMW, SIGNAL(UpdateRequest(int)), this  , SLOT(handleUpdateRequest(int)));
 }
 
@@ -617,7 +616,6 @@
 		m_item->RightLine  = rightLine->isChecked();
 		m_item->BottomLine = bottomLine->isChecked();
 		m_item->update();
-		emit DocChanged();
 	}
 }
 
@@ -661,7 +659,6 @@
 			m_item->setDashOffset(dashEditor->Offset->value() * m_item->lineWidth());
 		}
 		m_item->update();
-		emit DocChanged();
 	}
 }
 

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_line.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/ui/propertiespalette_line.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_line.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_line.h Mon Dec 19 23:22:37 2011
@@ -84,7 +84,6 @@
 	void handleLineStyle(QListWidgetItem *c);
 
 signals:
-	void DocChanged();
 	void lineModeChanged(int);
 };
 

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_shape.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/ui/propertiespalette_shape.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_shape.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_shape.cpp Mon Dec 19 23:22:37 2011
@@ -86,7 +86,6 @@
 {
 	m_ScMW = mw;
 
-	connect(this  , SIGNAL(DocChanged())      , m_ScMW, SLOT(slotDocCh()));
 	connect(m_ScMW, SIGNAL(UpdateRequest(int)), this  , SLOT(handleUpdateRequest(int)));
 }
 
@@ -413,7 +412,7 @@
 				mode = PageItem::TextFlowUsesImageClipping;
 		}
 		m_item->setTextFlowMode(mode);
-		emit DocChanged();
+		m_doc->changed();
 		m_doc->invalidateAll();
 		m_doc->regionsChanged()->update(QRect());
 	}
@@ -447,7 +446,7 @@
 			roundRect->setEnabled(false);
 			connect(m_ScMW->nodePalette, SIGNAL(paletteClosed()), this, SLOT(handleShapeEditEnded()));
 		}
-		emit DocChanged();
+		m_doc->changed();
 	}
 }
 
@@ -471,7 +470,7 @@
 		return;
 	m_item->setCornerRadius(roundRect->value() / m_unitRatio);
 	m_ScMW->view->SetFrameRounded();
-	emit DocChanged();
+	m_doc->changed();
 	m_doc->regionsChanged()->update(QRect());
 }
 
@@ -481,7 +480,6 @@
 		return;
 	m_item->fillRule = evenOdd->isChecked();
 	m_item->update();
-	emit DocChanged();
 }
 
 void PropertiesPalette_Shape::handleNewShape(int f, int c, qreal *vals)
@@ -507,6 +505,8 @@
 //		m_item->convertTo(PageItem::Polygon);
 //		newSelection(6);
 		roundRect->setEnabled(f == 0);
+		m_doc->invalidateAll();
+		m_doc->regionsChanged()->update(QRect());
 	}
 }
 

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_shape.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/ui/propertiespalette_shape.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_shape.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_shape.h Mon Dec 19 23:22:37 2011
@@ -80,9 +80,6 @@
 	void handleCornerRadius();
 	void handleFillRule();
 	void handleNewShape(int, int, qreal *);
-
-signals:
-	void DocChanged();
 };
 
 #endif

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_text.cpp Mon Dec 19 23:22:37 2011
@@ -122,7 +122,6 @@
 	optMargins->setMainWindow(mw);
 	pathTextWidgets->setMainWindow(mw);
 
-	connect(this  , SIGNAL(DocChanged())           , m_ScMW, SLOT(slotDocCh()));
 	connect(m_ScMW, SIGNAL(UpdateRequest(int))     , this  , SLOT(handleUpdateRequest(int)));
 
 	connect(paraStyleCombo, SIGNAL(newStyle(const QString&)), m_ScMW, SLOT(setNewParStyle(const QString&)), Qt::UniqueConnection);
@@ -665,5 +664,4 @@
 	else if( radioFlop == PropertyWidget_Flop::LineSpacingID)
 		m_item->setFirstLineOffset(FLOPLineSpacing);
 	m_item->update();
-	emit DocChanged();
-}
+}

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_text.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/ui/propertiespalette_text.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_text.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_text.h Mon Dec 19 23:22:37 2011
@@ -141,7 +141,6 @@
 	QTreeWidgetItem* pathTextItem;
 
 signals:
-	void DocChanged();
 };
 
 #endif

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp Mon Dec 19 23:22:37 2011
@@ -148,7 +148,6 @@
 {
 	m_ScMW = mw;
 
-	connect(this, SIGNAL(DocChanged()), m_ScMW, SLOT(slotDocCh()));
 	connect(mw, SIGNAL(AppModeChanged(int, int)), this, SLOT(handleAppModeChanged(int, int)));
 }
 
@@ -417,7 +416,9 @@
 
 void PropertiesPalette_XYZ::handleAppModeChanged(int oldMode, int mode)
 {
-	doUnGroup->setEnabled(mode != modeEdit && mode != modeEditClip);
+	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+	doUnGroup->setEnabled(mode != modeEdit && mode != modeEditClip && m_item->isGroup());
 }
 
 void PropertiesPalette_XYZ::handleSelectionChanged()
@@ -748,7 +749,7 @@
 			}
 		}
 		m_doc->regionsChanged()->update(QRect());
-		emit DocChanged();
+		m_doc->changed();
 	}
 }
 
@@ -829,7 +830,7 @@
 		}
 	}
 	m_doc->regionsChanged()->update(QRect());
-	emit DocChanged();
+	m_doc->changed();
 }
 
 void PropertiesPalette_XYZ::handleNewW()
@@ -953,7 +954,6 @@
 		}
 		m_item->Sizing = oldS;
 	}
-	//emit DocChanged();
 	m_doc->changed();
 	m_doc->regionsChanged()->update(QRect());
 }
@@ -1080,7 +1080,6 @@
 			}
 			m_item->Sizing = oldS;
 		}
-		//emit DocChanged();
 		m_doc->changed();
 		m_doc->regionsChanged()->update(QRect());
 	}
@@ -1109,7 +1108,7 @@
 				m_doc->m_Selection->itemAt(i)->checkChanges(true);
 			m_ScMW->view->endGroupTransaction();
 		}
-		emit DocChanged();
+		m_doc->changed();
 		m_doc->regionsChanged()->update(QRect());
 		m_oldRotation = rotationSpin->value();
 	}
@@ -1242,7 +1241,6 @@
 			{
 				m_item->AdjustPictScale();
 				m_item->update();
-				emit DocChanged();
 			}
 		}
 		m_haveItem = true;
@@ -1326,7 +1324,7 @@
 		if (m_item->itemName() != nameEdit->text())
 		{
 			m_item->setItemName(nameEdit->text());
-			emit DocChanged();
+			m_doc->changed();
 		}
 	}
 }
@@ -1502,4 +1500,6 @@
 void PropertiesPalette_XYZ::handleUngrouping()
 {
 	m_ScMW->UnGroupObj();
-}
+	m_doc->invalidateAll();
+	m_doc->regionsChanged()->update(QRect());
+}

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_xyz.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/ui/propertiespalette_xyz.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_xyz.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_xyz.h Mon Dec 19 23:22:37 2011
@@ -94,9 +94,6 @@
 	void spinboxFinishUserAction();
 	void updateSpinBoxConstants();
 
-signals:
-	void DocChanged();
-
 protected:
 	ScribusMainWindow *m_ScMW;
 

Modified: branches/ScribusOIF/scribus/ui/propertywidget_distance.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17101&path=/branches/ScribusOIF/scribus/ui/propertywidget_distance.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_distance.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_distance.cpp Mon Dec 19 23:22:37 2011
@@ -266,7 +266,6 @@
 		columnGapLabel->setEnabled(true);
 	}
 	m_item->update();
-	//emit DocChanged();
 }
 
 void PropertyWidget_Distance::handleColumnGap()
@@ -287,7 +286,6 @@
 		m_item->ColGap = newGap;
 	}
 	m_item->update();
-	//emit DocChanged();
 }
 
 void PropertyWidget_Distance::handleGapSwitch()
@@ -324,7 +322,6 @@
 				m_doc->itemSelection_ApplyParagraphStyle(newStyle);
 			}
 			m_item->update();
-			//emit DocChanged();
 		}
 		delete dia;
 	}
@@ -343,7 +340,6 @@
 		m_item->setTextToFrameDist(left, right, top, bottom);
 		displayColumns(m_item->Cols, m_item->ColGap);
 		m_item->update();
-		//emit DocChanged();
 	}
 }
 




More information about the scribus-commit mailing list