r16196 by fschmid - Fixed Bug #3640: "properties options displayed/enabled for groups based on individual item selected"

scribus-commit scribus-commit at lists.scribus.net
Sat Jan 1 21:58:36 CET 2011


Author: fschmid
Date: Sat Jan  1 20:58:36 2011
New Revision: 16196

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16196
Log:
Fixed Bug #3640: "properties options displayed/enabled for groups based on individual item selected"

Modified:
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
    trunk/Scribus/scribus/scribusdoc.cpp
    trunk/Scribus/scribus/ui/propertiespalette.cpp

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16196&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Sat Jan  1 20:58:36 2011
@@ -1656,6 +1656,8 @@
 	docu.writeAttribute("GRTYPS",item->GrTypeStroke);
 	docu.writeAttribute("ROT",item->rotation());
 	docu.writeAttribute("PRINTABLE", item->printEnabled() ? 1 : 0);
+	docu.writeAttribute("FLIPPEDH", item->imageFlippedH());
+	docu.writeAttribute("FLIPPEDV", item->imageFlippedV());
 	if (!(item->isGroup() || item->isSymbol()))
 	{
 		docu.writeAttribute("PWIDTH",item->lineWidth());
@@ -1738,8 +1740,6 @@
 		docu.writeAttribute("LOCALY",item->imageYOffset());
 		docu.writeAttribute("LOCALROT" ,item->imageRotation());
 		docu.writeAttribute("PICART", item->imageShown() ? 1 : 0);
-		docu.writeAttribute("FLIPPEDH", item->imageFlippedH());
-		docu.writeAttribute("FLIPPEDV", item->imageFlippedV());
 		docu.writeAttribute("SCALETYPE", item->ScaleType ? 1 : 0);
 		docu.writeAttribute("RATIO", item->AspectRatio ? 1 : 0);
 		if ( ! item->itemText.defaultStyle().charStyle().isInhFillColor())

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16196&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Sat Jan  1 20:58:36 2011
@@ -8258,7 +8258,7 @@
 				currItem->moveBy(ix-ix2, iy-iy2, true);
 				currItem->setRedrawBounding();
 			}
-			if ((currItem->itemType() == PageItem::ImageFrame) || (currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::Symbol))
+			if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup())
 				currItem->flipImageH();
 			if (currItem->itemType() != PageItem::Line)
 				MirrorPolyH(currItem);
@@ -8274,7 +8274,7 @@
 		for (uint a = 0; a < docSelectionCount; ++a)
 		{
 			PageItem* currItem=m_Selection->itemAt(a);
-			if ((currItem->itemType() == PageItem::ImageFrame) || (currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::Symbol))
+			if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup())
 				currItem->flipImageH();
 			if (currItem->itemType() != PageItem::Line)
 				MirrorPolyH(currItem);
@@ -8322,7 +8322,7 @@
 				currItem->moveBy(ix-ix2, iy-iy2, true);
 				currItem->setRedrawBounding();
 			}
-			if ((currItem->itemType() == PageItem::ImageFrame) || (currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::Symbol))
+			if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup())
 				currItem->flipImageV();
 			if (currItem->itemType() != PageItem::Line)
 				MirrorPolyV(currItem);
@@ -8339,7 +8339,7 @@
 		for (uint a = 0; a < docSelectionCount; ++a)
 		{
 			PageItem* currItem=m_Selection->itemAt(a);
-			if ((currItem->itemType() == PageItem::ImageFrame) || (currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::Symbol))
+			if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup())
 				currItem->flipImageV();
 			if (currItem->itemType() != PageItem::Line)
 				MirrorPolyV(currItem);

Modified: trunk/Scribus/scribus/ui/propertiespalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16196&path=/trunk/Scribus/scribus/ui/propertiespalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette.cpp Sat Jan  1 20:58:36 2011
@@ -1757,6 +1757,16 @@
 	setXY(i->xPos(), i->yPos());
 	setBH(i->width(), i->height());
 	NoPrint->setChecked(!i->printEnabled());
+	if (i->isImageFrame() || i->isTextFrame() || i->isLatexFrame() || i->isOSGFrame() || i->isSymbol() || i->isGroup())
+	{
+		FlipH->setCheckable(true);
+		FlipV->setCheckable(true);
+	}
+	else
+	{
+		FlipH->setCheckable(false);
+		FlipV->setCheckable(false);
+	}
 	setFlippedH(i->imageFlippedH());
 	setFlippedV(i->imageFlippedV());
 	RoVal = i->rotation();
@@ -2113,15 +2123,20 @@
 		TabStack->setItemEnabled(idTransparencyItem, true);
 		//CB If Toggle is not possible, then we need to enable it so we can turn it off
 		//It then gets reset below for items where its valid
-		if ((nr>4) && (nr<9))
+		FlipH->setCheckable(true);
+		FlipV->setCheckable(true);
+		if ((nr == 2) || (nr == 4) || ((nr >= 9) && (nr <= 12)))
 		{
 			FlipH->setCheckable(true);
 			FlipV->setCheckable(true);
+		}
+		else
+		{
+			FlipH->setCheckable(false);
+			FlipV->setCheckable(false);
 			FlipH->setChecked(false);
 			FlipV->setChecked(false);
 		}
-		FlipH->setCheckable((nr>=0) && (nr<5));
-		FlipV->setCheckable((nr>=0) && (nr<5));
 		//CB Why cant we do this for lines?
 //		FlipH->setEnabled((nr!=-1) && (nr!=5));
 //		FlipV->setEnabled((nr!=-1) && (nr!=5));




More information about the scribus-commit mailing list