From f1199488418ac6175821c7fb507f2757ed17424a Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 14 Feb 2008 19:05:54 +0000 Subject: [PATCH] connect to the changed signals _after_ we set the states, otherwise end up in pushing back to the form fields the same value svn path=/trunk/KDE/kdegraphics/okular/; revision=775040 --- ui/formwidgets.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/formwidgets.cpp b/ui/formwidgets.cpp index 83380f223..6a89d7c99 100644 --- a/ui/formwidgets.cpp +++ b/ui/formwidgets.cpp @@ -211,7 +211,6 @@ CheckBoxEdit::CheckBoxEdit( Okular::FormFieldButton * button, QWidget * parent ) setText( m_form->caption() ); setEnabled( !m_form->isReadOnly() ); - connect( this, SIGNAL( stateChanged( int ) ), this, SLOT( slotStateChanged( int ) ) ); setVisible( m_form->isVisible() ); } @@ -224,6 +223,8 @@ void CheckBoxEdit::setFormWidgetsController( FormWidgetsController *controller ) m_controller->registerRadioButton( this, siblings ); setCheckState( m_form->state() ? Qt::Checked : Qt::Unchecked ); + + connect( this, SIGNAL( stateChanged( int ) ), this, SLOT( slotStateChanged( int ) ) ); } QAbstractButton* CheckBoxEdit::button() @@ -243,7 +244,6 @@ RadioButtonEdit::RadioButtonEdit( Okular::FormFieldButton * button, QWidget * pa setText( m_form->caption() ); setEnabled( !m_form->isReadOnly() ); - connect( this, SIGNAL( toggled( bool ) ), this, SLOT( slotToggled( bool ) ) ); setVisible( m_form->isVisible() ); } @@ -254,6 +254,8 @@ void RadioButtonEdit::setFormWidgetsController( FormWidgetsController *controlle m_controller->registerRadioButton( this, m_form->siblings() ); setChecked( m_form->state() ); + + connect( this, SIGNAL( toggled( bool ) ), this, SLOT( slotToggled( bool ) ) ); } QAbstractButton* RadioButtonEdit::button()