r21932 by jghali - #14760: The Paragraph Effects tab in the Text Properties Palette is completely unusable

scribus-commit scribus-commit at lists.scribus.net
Wed Apr 19 15:39:01 UTC 2017


Author: jghali
Date: Wed Apr 19 15:39:01 2017
New Revision: 21932

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21932
Log:
#14760: The Paragraph Effects tab in the Text Properties Palette is completely unusable

Modified:
    trunk/Scribus/scribus/ui/propertiespalette_text.cpp
    trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
    trunk/Scribus/scribus/ui/propertywidget_pareffect.h

Modified: trunk/Scribus/scribus/ui/propertiespalette_text.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21932&path=/trunk/Scribus/scribus/ui/propertiespalette_text.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_text.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_text.cpp	Wed Apr 19 15:39:01 2017
@@ -102,7 +102,6 @@
 	fontfeaturesWidget = new PropertyWidget_FontFeatures(textTree);
 	fontfeaturesWidgetItem = textTree->addItem(fontfeaturesWidget, tr("Font Features"));
 
-
 	pathTextWidgets = new PropertyWidget_PathText(textTree);
 	pathTextItem = textTree->addItem(pathTextWidgets, tr("Path Text Properties"));
 
@@ -117,10 +116,12 @@
 	connect(paraStyleClear, SIGNAL(clicked()), this, SLOT(doClearPStyle()));
 
 	connect(flopBox->flopGroup, SIGNAL(buttonClicked( int )), this, SLOT(handleFirstLinePolicy(int)));
-	connect(fontfeaturesWidget, SIGNAL(needsRelayout()), this, SLOT(updateTreeLayout()));
 
 	connect(lineSpacingModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(handleLineSpacingMode(int)));
 	connect(langCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changeLang(int)));
+
+	connect(fontfeaturesWidget, SIGNAL(needsRelayout()), this, SLOT(updateTreeLayout()));
+	connect(parEffectWidgets,   SIGNAL(needsRelayout()), this, SLOT(updateTreeLayout()));
 
 	m_haveItem = false;
 	setEnabled(false);

Modified: trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21932&path=/trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp	Wed Apr 19 15:39:01 2017
@@ -230,6 +230,8 @@
 
 void PropertyWidget_ParEffect::updateStyle(const ParagraphStyle& newPStyle)
 {
+	int oldPeComboIndex = peCombo->currentIndex();
+
 	if (peCombo->currentIndex() && !newPStyle.hasBullet() && !newPStyle.hasDropCap() && !newPStyle.hasNum())
 	{
 		enableParEffect(false);
@@ -293,6 +295,9 @@
 	showCharStyle(newPStyle.peCharStyleName());
 
 	enableParEffect(enablePE);
+
+	if (oldPeComboIndex != peCombo->currentIndex())
+		emit needsRelayout();
 }
 
 void PropertyWidget_ParEffect::connectSignals()
@@ -373,6 +378,7 @@
 {
 	if (!m_doc || !m_item)
 		return;
+
 	ParagraphStyle newStyle;
 	enableParEffect(peCombo->currentIndex() != 0);
 	if (peCombo->currentIndex() == 1)
@@ -421,6 +427,8 @@
 	newStyle.setParEffectOffset(peOffset->value() / m_unitRatio);
 	newStyle.setParEffectIndent(peIndent->isChecked());
 	handleChanges(m_item, newStyle);
+
+	emit needsRelayout();
 }
 
 void PropertyWidget_ParEffect::handleBulletStr(QString bulStr)

Modified: trunk/Scribus/scribus/ui/propertywidget_pareffect.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21932&path=/trunk/Scribus/scribus/ui/propertywidget_pareffect.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_pareffect.h	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_pareffect.h	Wed Apr 19 15:39:01 2017
@@ -12,7 +12,7 @@
 
 class PropertyWidget_ParEffect : public QFrame, private Ui::PropertyWidget_ParEffectBase, public PropertyWidgetBase
 {
-    Q_OBJECT
+	Q_OBJECT
 
 public:
 	PropertyWidget_ParEffect(QWidget *parent = 0);
@@ -27,6 +27,7 @@
 	CharSelectEnhanced * m_enhanced;
 	
 	void fillNumerationsCombo();
+
 protected:
 	double m_unitRatio;
 	int    m_unitIndex;
@@ -81,15 +82,8 @@
 
 	void fillPECombo();
 
-//	void SMPStyleWidget::fillNumRestartCombo()
-//	{
-//		numRestartCombo->clear();
-//		numRestartCombo->addItem(tr("Document"));
-//		numRestartCombo->addItem(tr("Section"));
-//		numRestartCombo->addItem(tr("Story"));
-//		numRestartCombo->addItem(tr("Page"));
-//		numRestartCombo->addItem(tr("Frame"));
-//	}
+signals:
+	void needsRelayout();
 };
 
 #endif // PROPERTYWIDGET_PAREFFECT_H




More information about the scribus-commit mailing list