r16770 by jghali - #10160: First line offset radio buttons un-useable

scribus-commit scribus-commit at lists.scribus.net
Mon Aug 8 11:51:49 UTC 2011


Author: jghali
Date: Mon Aug  8 11:51:49 2011
New Revision: 16770

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16770
Log:
#10160: First line offset radio buttons un-useable

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

Modified: trunk/Scribus/scribus/ui/propertiespalette_text.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16770&path=/trunk/Scribus/scribus/ui/propertiespalette_text.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_text.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_text.cpp Mon Aug  8 11:51:49 2011
@@ -954,11 +954,11 @@
 {
 	if (!m_ScMW || m_ScMW->scriptIsRunning() || !m_haveDoc || !m_haveItem)
 		return;
-	if( radioFlop == 0)
+	if( radioFlop == PropertyWidget_Flop::RealHeightID)
 		m_item->setFirstLineOffset(FLOPRealGlyphHeight);
-	else if( radioFlop == 1)
+	else if( radioFlop == PropertyWidget_Flop::FontAscentID)
 		m_item->setFirstLineOffset(FLOPFontAscent);
-	else if( radioFlop == 2)
+	else if( radioFlop == PropertyWidget_Flop::LineSpacingID)
 		m_item->setFirstLineOffset(FLOPLineSpacing);
 	m_item->update();
 	emit DocChanged();

Modified: trunk/Scribus/scribus/ui/propertywidget_flop.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16770&path=/trunk/Scribus/scribus/ui/propertywidget_flop.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_flop.cpp (original)
+++ trunk/Scribus/scribus/ui/propertywidget_flop.cpp Mon Aug  8 11:51:49 2011
@@ -20,6 +20,10 @@
 	layout()->setAlignment( Qt::AlignTop );
 	
 	flopRealHeight->setChecked(true);
+
+	flopGroup->setId(flopRealHeight,  RealHeightID);
+    flopGroup->setId(flopFontAscent,  FontAscentID);
+    flopGroup->setId(flopLineSpacing, LineSpacingID);
 
 	languageChange();
 }

Modified: trunk/Scribus/scribus/ui/propertywidget_flop.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16770&path=/trunk/Scribus/scribus/ui/propertywidget_flop.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_flop.h (original)
+++ trunk/Scribus/scribus/ui/propertywidget_flop.h Mon Aug  8 11:51:49 2011
@@ -18,6 +18,14 @@
 	Q_OBJECT
 
 public:
+
+	enum FlopButtonID
+    {
+        RealHeightID  = 0,
+        FontAscentID  = 1,
+        LineSpacingID = 2
+    };
+
 	PropertyWidget_Flop(QWidget* parent);
 	~PropertyWidget_Flop() {};
 




More information about the scribus-commit mailing list