r17290 by fschmid - Bug 10571: "Some Edit Boxes trigger an action on every user keystroke", first Part Properties Palette

scribus-commit scribus-commit at lists.scribus.net
Sat Feb 11 08:06:56 UTC 2012


Author: fschmid
Date: Sat Feb 11 08:06:56 2012
New Revision: 17290

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17290
Log:
Bug 10571: "Some Edit Boxes trigger an action on every user keystroke", first Part Properties Palette 

Modified:
    trunk/Scribus/scribus/ui/propertiespalette_image.cpp
    trunk/Scribus/scribus/ui/propertiespalette_image.h

Modified: trunk/Scribus/scribus/ui/propertiespalette_image.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17290&path=/trunk/Scribus/scribus/ui/propertiespalette_image.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_image.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_image.cpp Sat Feb 11 08:06:56 2012
@@ -47,6 +47,7 @@
 	imagePageNumber->setMinimum(0);
 	imagePageNumber->setSpecialValueText(tr( "Auto" ));
 	imagePageNumberLabel->setBuddy(imagePageNumber);
+	installSniffer(imagePageNumber);
 	
 //	freeScale = new QRadioButton( "&Free Scaling", this );
 //	freeScale->setChecked( true );
@@ -203,6 +204,21 @@
 }
 
 void PropertiesPalette_Image::installSniffer(ScrSpinBox *spinBox)
+{
+	const QList<QObject*> list = spinBox->children();
+	if (!list.isEmpty())
+	{
+		QListIterator<QObject*> it(list);
+		QObject *obj;
+		while (it.hasNext())
+		{
+			obj = it.next();
+			obj->installEventFilter(userActionSniffer);
+		}
+	}
+}
+
+void PropertiesPalette_Image::installSniffer(QSpinBox *spinBox)
 {
 	const QList<QObject*> list = spinBox->children();
 	if (!list.isEmpty())

Modified: trunk/Scribus/scribus/ui/propertiespalette_image.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17290&path=/trunk/Scribus/scribus/ui/propertiespalette_image.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_image.h (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_image.h Sat Feb 11 08:06:56 2012
@@ -51,6 +51,7 @@
 
 	UserActionSniffer *userActionSniffer;
 	void installSniffer(ScrSpinBox *spinBox);
+	void installSniffer(QSpinBox *spinBox);
 
 private:
 




More information about the scribus-commit mailing list