r20705 by craig -
scribus-commit
scribus-commit at lists.scribus.net
Sat Jan 23 16:31:11 UTC 2016
Author: craig
Date: Sat Jan 23 16:31:11 2016
New Revision: 20705
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20705
Log:
#13675: Reduce code and fix level bug for tables
Modified:
trunk/Scribus/scribus/appmodehelper.cpp
Modified: trunk/Scribus/scribus/appmodehelper.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20705&path=/trunk/Scribus/scribus/appmodehelper.cpp
==============================================================================
--- trunk/Scribus/scribus/appmodehelper.cpp (original)
+++ trunk/Scribus/scribus/appmodehelper.cpp Sat Jan 23 16:31:11 2016
@@ -542,10 +542,6 @@
(*a_scrActions)["itemMulDuplicate"]->setEnabled(true);
(*a_scrActions)["itemTransform"]->setEnabled(true);
(*a_scrActions)["itemDelete"]->setEnabled(!inAnEditMode);
- (*a_scrActions)["itemRaise"]->setEnabled(true);
- (*a_scrActions)["itemLower"]->setEnabled(true);
- (*a_scrActions)["itemRaiseToTop"]->setEnabled(true);
- (*a_scrActions)["itemLowerToBottom"]->setEnabled(true);
(*a_scrActions)["itemSendToPattern"]->setEnabled(!inAnEditMode);
(*a_scrActions)["itemSendToInline"]->setEnabled(!inAnEditMode);
(*a_scrActions)["itemAdjustFrameToImage"]->setEnabled(true);
@@ -596,10 +592,6 @@
(*a_scrActions)["itemMulDuplicate"]->setEnabled(true);
(*a_scrActions)["itemTransform"]->setEnabled(true);
(*a_scrActions)["itemDelete"]->setEnabled(!inAnEditMode);
- (*a_scrActions)["itemRaise"]->setEnabled(true);
- (*a_scrActions)["itemLower"]->setEnabled(true);
- (*a_scrActions)["itemRaiseToTop"]->setEnabled(true);
- (*a_scrActions)["itemLowerToBottom"]->setEnabled(true);
//scrMenuMgr->setMenuEnabled("itemSendToScrapbook", true);
(*a_scrActions)["itemSendToPattern"]->setEnabled(!inAnEditMode);
(*a_scrActions)["itemSendToInline"]->setEnabled(!inAnEditMode);
@@ -697,10 +689,6 @@
(*a_scrActions)["itemMulDuplicate"]->setEnabled(true);
(*a_scrActions)["itemTransform"]->setEnabled(true);
(*a_scrActions)["itemDelete"]->setEnabled(!inAnEditMode);
- (*a_scrActions)["itemRaise"]->setEnabled(true);
- (*a_scrActions)["itemLower"]->setEnabled(true);
- (*a_scrActions)["itemRaiseToTop"]->setEnabled(true);
- (*a_scrActions)["itemLowerToBottom"]->setEnabled(true);
// (*a_scrActions)["itemSendToScrapbook"]->setEnabled(true);
(*a_scrActions)["itemSendToPattern"]->setEnabled(!inAnEditMode);
(*a_scrActions)["itemSendToInline"]->setEnabled(!inAnEditMode);
@@ -749,10 +737,6 @@
(*a_scrActions)["itemMulDuplicate"]->setEnabled(true);
(*a_scrActions)["itemTransform"]->setEnabled(true);
(*a_scrActions)["itemDelete"]->setEnabled(!inAnEditMode);
- (*a_scrActions)["itemRaise"]->setEnabled(true);
- (*a_scrActions)["itemLower"]->setEnabled(true);
- (*a_scrActions)["itemRaiseToTop"]->setEnabled(true);
- (*a_scrActions)["itemLowerToBottom"]->setEnabled(true);
(*a_scrActions)["itemSendToPattern"]->setEnabled(!inAnEditMode);
(*a_scrActions)["itemSendToInline"]->setEnabled(!inAnEditMode);
(*a_scrActions)["itemAdjustFrameToImage"]->setEnabled(false);
@@ -904,6 +888,7 @@
(*a_scrActions)["itemGroupAdjust"]->setEnabled(false);
(*a_scrActions)["itemSplitPolygons"]->setEnabled( (currItem->asPolygon()) && (currItem->Segments.count() != 0) );
}
+ bool levelEnabled = true;
if (currItem->locked())
{
(*a_scrActions)["itemConvertToBezierCurve"]->setEnabled(false);
@@ -917,16 +902,13 @@
(*a_scrActions)["itemDetachTextFromPath"]->setEnabled(false);
(*a_scrActions)["itemCombinePolygons"]->setEnabled(false);
(*a_scrActions)["itemDelete"]->setEnabled(false);
- (*a_scrActions)["itemLowerToBottom"]->setEnabled(false);
- (*a_scrActions)["itemRaiseToTop"]->setEnabled(false);
- (*a_scrActions)["itemRaise"]->setEnabled(false);
- (*a_scrActions)["itemLower"]->setEnabled(false);
(*a_scrActions)["itemSendToPattern"]->setEnabled(!inAnEditMode);
(*a_scrActions)["itemSendToInline"]->setEnabled(!inAnEditMode);
(*a_scrActions)["editCut"]->setEnabled(false);
(*a_scrActions)["editClearContents"]->setEnabled(false);
(*a_scrActions)["editTruncateContents"]->setEnabled(false);
(*a_scrActions)["toolsRotate"]->setEnabled(false);
+ levelEnabled = false;
}
else
{
@@ -948,12 +930,13 @@
break;
}
}
- (*a_scrActions)["itemRaise"]->setEnabled(haveSameParent);
- (*a_scrActions)["itemLower"]->setEnabled(haveSameParent);
- (*a_scrActions)["itemRaiseToTop"]->setEnabled(haveSameParent);
- (*a_scrActions)["itemLowerToBottom"]->setEnabled(haveSameParent);
+ levelEnabled = haveSameParent;
}
}
+ (*a_scrActions)["itemRaise"]->setEnabled(levelEnabled);
+ (*a_scrActions)["itemLower"]->setEnabled(levelEnabled);
+ (*a_scrActions)["itemRaiseToTop"]->setEnabled(levelEnabled);
+ (*a_scrActions)["itemLowerToBottom"]->setEnabled(levelEnabled);
if (inAnEditMode)
{
(*a_scrActions)["itemSendToPattern"]->setEnabled(false);
More information about the scribus-commit
mailing list