r20169 by jghali - #13133: "Has Drop Shadow" checkbox does not apply shadow when checked, but when unchecked

scribus-commit scribus-commit at lists.scribus.net
Wed Jun 17 22:33:59 UTC 2015


Author: jghali
Date: Wed Jun 17 22:33:59 2015
New Revision: 20169

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20169
Log:
#13133: "Has Drop Shadow" checkbox does not apply shadow when checked, but when unchecked

Modified:
    trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp
    trunk/Scribus/scribus/ui/proptree.cpp
    trunk/Scribus/scribus/ui/proptree.h

Modified: trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20169&path=/trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_shadow.cpp Wed Jun 17 22:33:59 2015
@@ -82,17 +82,9 @@
 
 	languageChange();
 	m_haveItem = false;
+
 	setSizePolicy( QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));
-	connect(hasSoftShadow, SIGNAL(valueChanged(bool)), this, SLOT(handleNewValues()));
-	connect(softShadowXOffset, SIGNAL(valueChanged(double)), this, SLOT(handleNewValues()));
-	connect(softShadowYOffset, SIGNAL(valueChanged(double)), this, SLOT(handleNewValues()));
-	connect(softShadowBlurRadius, SIGNAL(valueChanged(double)), this, SLOT(handleNewValues()));
-	connect(softShadowColor, SIGNAL(valueChanged(QString)), this, SLOT(handleNewValues()));
-	connect(softShadowShade, SIGNAL(valueChanged(double)), this, SLOT(handleNewValues()));
-	connect(softShadowOpacity, SIGNAL(valueChanged(double)), this, SLOT(handleNewValues()));
-	connect(softShadowBlendMode, SIGNAL(valueChanged(int)), this, SLOT(handleNewValues()));
-	connect(softShadowErase, SIGNAL(valueChanged(bool)), this, SLOT(handleNewValues()));
-	connect(softShadowObjTrans, SIGNAL(valueChanged(bool)), this, SLOT(handleNewValues()));
+	connect(this->model(), SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), this, SLOT(handleNewValues()));
 
 	m_haveItem = false;
 }

Modified: trunk/Scribus/scribus/ui/proptree.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20169&path=/trunk/Scribus/scribus/ui/proptree.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/proptree.cpp (original)
+++ trunk/Scribus/scribus/ui/proptree.cpp Wed Jun 17 22:33:59 2015
@@ -125,8 +125,8 @@
 		editor->setValues(item->m_min, item->m_max, 0, val);
 		edito = editor;
 		edito->setAutoFillBackground(true);
+		connect(editor, SIGNAL(valueChanged(double)), this, SLOT(valueHasChanged()));
 		connect(editor, SIGNAL(valueChanged(double)), item, SIGNAL(valueChanged(double)));
-		connect(editor, SIGNAL(valueChanged(double)), this, SLOT(valueHasChanged()));
 	}
 	else if (item->m_type == PropTreeItem::DoubleSpinBox)
 	{
@@ -135,8 +135,8 @@
 		editor->setValues(item->m_fmin, item->m_fmax, item->m_decimals, val);
 		edito = editor;
 		edito->setAutoFillBackground(true);
+		connect(editor, SIGNAL(valueChanged(double)), this, SLOT(valueHasChanged()));
 		connect(editor, SIGNAL(valueChanged(double)), item, SIGNAL(valueChanged(double)));
-		connect(editor, SIGNAL(valueChanged(double)), this, SLOT(valueHasChanged()));
 	}
 	else if (item->m_type == PropTreeItem::ComboBox)
 	{
@@ -144,17 +144,17 @@
 		editor->addItems(index.model()->data(index, Qt::UserRole+1).toStringList());
 		edito = editor;
 		edito->setAutoFillBackground(true);
+		connect(editor, SIGNAL(activated(int)), this, SLOT(valueHasChanged()));
 		connect(editor, SIGNAL(activated(int)), item, SIGNAL(valueChanged(int)));
 		connect(editor, SIGNAL(activated(QString)), item, SIGNAL(valueChanged(QString)));
-		connect(editor, SIGNAL(activated(int)), this, SLOT(valueHasChanged()));
 	}
 	else if (item->m_type == PropTreeItem::CheckBox)
 	{
 		QCheckBox *editor = new QCheckBox(parent);
 		edito = editor;
 		edito->setAutoFillBackground(true);
+		connect(editor, SIGNAL(clicked(bool)), this, SLOT(valueHasChanged()));
 		connect(editor, SIGNAL(clicked(bool)), item, SIGNAL(valueChanged(bool)));
-		connect(editor, SIGNAL(clicked(bool)), this, SLOT(valueHasChanged()));
 	}
 	else if (item->m_type == PropTreeItem::ColorComboBox)
 	{
@@ -162,9 +162,9 @@
 		editor->updateBox(item->m_colors, ColorCombo::fancyPixmaps, false);
 		edito = editor;
 		edito->setAutoFillBackground(true);
+		connect(editor, SIGNAL(activated(int)), this, SLOT(valueHasChanged()));
 		connect(editor, SIGNAL(activated(int)), item, SIGNAL(valueChanged(int)));
 		connect(editor, SIGNAL(activated(QString)), item, SIGNAL(valueChanged(QString)));
-		connect(editor, SIGNAL(activated(int)), this, SLOT(valueHasChanged()));
 	}
 	else
 		edito = 0;

Modified: trunk/Scribus/scribus/ui/proptree.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20169&path=/trunk/Scribus/scribus/ui/proptree.h
==============================================================================
--- trunk/Scribus/scribus/ui/proptree.h (original)
+++ trunk/Scribus/scribus/ui/proptree.h Wed Jun 17 22:33:59 2015
@@ -67,6 +67,7 @@
 //	PropTreeItem(QTreeWidget* parent, QString title, bool value);
 //	PropTreeItem(QTreeWidget *parent, QString title, QString value);
 	~PropTreeItem() {};
+
 	enum PropItemType
 	{
 		Title      = 0,




More information about the scribus-commit mailing list