r19531 by jghali - #12662: prevent deletion of "Black", "White" and registration color
scribus-commit
scribus-commit at lists.scribus.net
Tue Sep 23 21:51:46 UTC 2014
Author: jghali
Date: Tue Sep 23 21:51:46 2014
New Revision: 19531
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19531
Log:
#12662: prevent deletion of "Black", "White" and registration color
Modified:
trunk/Scribus/scribus/ui/paintmanager.cpp
Modified: trunk/Scribus/scribus/ui/paintmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19531&path=/trunk/Scribus/scribus/ui/paintmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/paintmanager.cpp (original)
+++ trunk/Scribus/scribus/ui/paintmanager.cpp Tue Sep 23 21:51:46 2014
@@ -842,6 +842,8 @@
else
{
QString dColor = it->text(0);
+ if (dColor == "Black" || dColor == "White" || m_colorList[dColor].isRegistrationColor())
+ return;
ColorList UsedCG = getGradientColors();
if (inDocUsedColors.contains(dColor) || UsedCG.contains(dColor))
{
@@ -1926,6 +1928,10 @@
QList<QTreeWidgetItem *> selItems = dataTree->selectedItems();
QString belowText = dataTree->itemBelow(selItems[selItems.count()-1])->text(0);
+ // Prevent deletion of Black, White and Registration color
+ if (!deleteButton->isEnabled())
+ return;
+
if (k->modifiers()==Qt::NoModifier && (k->key()==Qt::Key_Delete || k->key()==Qt::Key_Backspace))
removeColorItem();
More information about the scribus-commit
mailing list