r17806 by fschmid - Fixed Bug #11034 "Disable the Shape feature for tables"
scribus-commit
scribus-commit at lists.scribus.net
Sun Oct 14 18:53:41 UTC 2012
Author: fschmid
Date: Sun Oct 14 18:53:41 2012
New Revision: 17806
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17806
Log:
Fixed Bug #11034 "Disable the Shape feature for tables"
Modified:
trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
trunk/Scribus/scribus/ui/propertiespalette_shape.h
Modified: trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17806&path=/trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_shape.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_shape.cpp Sun Oct 14 18:53:41 2012
@@ -159,15 +159,10 @@
QPalette pal(qApp->palette());
if (isLocked)
pal.setCurrentColorGroup(QPalette::Disabled);
-
- bool shapeEditLocked = isLocked;
- if (m_haveItem)
- shapeEditLocked |= m_item->sizeLocked();
- editShape->setEnabled(!shapeEditLocked);
-
if ((m_haveDoc) && (m_haveItem))
{
enableCustomShape();
+ enableEditShape();
if (((m_item->asTextFrame()) || (m_item->asImageFrame()) || (m_item->asPolygon())) && (!m_item->ClipEdited) && ((m_item->FrameType == 0) || (m_item->FrameType == 2)))
roundRect->setEnabled(!isLocked);
else
@@ -175,12 +170,9 @@
}
}
-void PropertiesPalette_Shape::setSizeLocked(bool isLocked)
-{
- bool shapeEditLocked = isLocked;
- if (m_haveItem)
- shapeEditLocked |= m_item->locked();
- editShape->setEnabled(!shapeEditLocked);
+void PropertiesPalette_Shape::setSizeLocked(bool )
+{
+ enableEditShape();
}
void PropertiesPalette_Shape::setRoundRectEnabled(bool enabled)
@@ -201,8 +193,23 @@
enabled &= !m_item->isSpiral();
enabled &= !m_item->isRegularPolygon();
enabled &= !m_item->locked();
+ enabled &= !m_item->sizeLocked();
+ enabled &= !m_item->isTable();
}
customShape->setEnabled(enabled);
+}
+
+void PropertiesPalette_Shape::enableEditShape()
+{
+ bool enabled = false;
+ if (m_item)
+ {
+ enabled = true;
+ enabled &= !m_item->locked();
+ enabled &= !m_item->sizeLocked();
+ enabled &= !m_item->isTable();
+ }
+ editShape->setEnabled(enabled);
}
void PropertiesPalette_Shape::handleSelectionChanged()
@@ -222,7 +229,7 @@
m_haveItem = (itemType != -1);
if (itemType != -1)
{
- editShape->setEnabled(!currItem->locked() && !currItem->sizeLocked());
+ enableEditShape();
enableCustomShape();
}
else
@@ -296,6 +303,12 @@
else
roundRect->setEnabled(false);
break;
+ case PageItem::Table:
+ setEnabled(true);
+ roundRect->setEnabled(false);
+ editShape->setEnabled(false);
+ customShape->setEnabled(false);
+ break;
}
}
setCurrentItem(currItem);
@@ -376,6 +389,13 @@
if (m_item->asSymbolFrame())
{
setEnabled(false);
+ }
+ if (m_item->asTable())
+ {
+ setEnabled(true);
+ roundRect->setEnabled(false);
+ editShape->setEnabled(false);
+ customShape->setEnabled(false);
}
m_haveItem = true;
displayTextFlowMode(m_item->textFlowMode());
Modified: trunk/Scribus/scribus/ui/propertiespalette_shape.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17806&path=/trunk/Scribus/scribus/ui/propertiespalette_shape.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_shape.h (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_shape.h Sun Oct 14 18:53:41 2012
@@ -57,6 +57,7 @@
ScribusMainWindow *m_ScMW;
void enableCustomShape();
+ void enableEditShape();
public slots:
void setMainWindow(ScribusMainWindow *mw);
More information about the scribus-commit
mailing list