r16284 by fschmid - Disable the vertical and horizontal flipping for Arc and RegularPolygon items.
scribus-commit
scribus-commit at lists.scribus.net
Wed Jan 19 23:09:33 CET 2011
Author: fschmid
Date: Wed Jan 19 22:09:33 2011
New Revision: 16284
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16284
Log:
Disable the vertical and horizontal flipping for Arc and RegularPolygon items.
Modified:
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/ui/propertiespalette.cpp
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16284&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Wed Jan 19 22:09:33 2011
@@ -5044,6 +5044,9 @@
// If converting a text frame to another object, drop links
if (oldItem->asTextFrame() && (newType != PageItem::TextFrame))
oldItem->dropLinks();
+ // if converting an arc to another object release size lock
+ if (oldItem->isArc() && (newType != PageItem::Arc))
+ newItem->setSizeLocked(false);
// If converting text to path, delete the bezier
if (newType == PageItem::PathText)
{
Modified: trunk/Scribus/scribus/ui/propertiespalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16284&path=/trunk/Scribus/scribus/ui/propertiespalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette.cpp Wed Jan 19 22:09:33 2011
@@ -1768,6 +1768,8 @@
FlipH->setCheckable(false);
FlipV->setCheckable(false);
}
+ FlipH->setDisabled(i->isRegularPolygon() || i->isArc());
+ FlipV->setDisabled(i->isRegularPolygon() || i->isArc());
setFlippedH(i->imageFlippedH());
setFlippedV(i->imageFlippedV());
RoVal = i->rotation();
@@ -2142,8 +2144,8 @@
//CB Why cant we do this for lines?
// FlipH->setEnabled((nr!=-1) && (nr!=5));
// FlipV->setEnabled((nr!=-1) && (nr!=5));
- FlipH->setEnabled(nr!=-1);
- FlipV->setEnabled(nr!=-1);
+ FlipH->setEnabled(nr!=-1 && nr!=13 && nr!=14);
+ FlipV->setEnabled(nr!=-1 && nr!=13 && nr!=14);
switch (nr)
{
case -1:
@@ -2278,9 +2280,20 @@
return;
//CB Having added the selection and undo transaction to mirrorpolyh/v in doc,
//these can be enabled all the time
- FlipH->setEnabled(true);
- FlipV->setEnabled(true);
NameEdit->setEnabled(!isMultiple);
+ uint selectedItemCount = doc->m_Selection->count();
+ bool found = false;
+ if (selectedItemCount != 0)
+ {
+ for (uint i = 0; i < selectedItemCount; ++i)
+ {
+ if (doc->m_Selection->itemAt(i)->isArc() || doc->m_Selection->itemAt(i)->isRegularPolygon())
+ found = true;
+ break;
+ }
+ }
+ FlipH->setEnabled(!found);
+ FlipV->setEnabled(!found);
if (doc->m_Selection->count() > 1)
{
FlipH->setCheckable( false );
More information about the scribus-commit
mailing list