Angus Leeming wrote:
> The attached patch is identical to that just submitted to the 1.4.x
> tree. Please add it to you list of patches for 1.3.x, Jean-Marc.
> 
> If anyone can see what needs to be done to fix this in the Qt
> frontend, then they're a better man than I.

google helped me out. 

Jean-Marc, I attach a patch that squashes bug 803 in the 13x tree for
both the XForms and the Qt frontends.

-- 
Angus
Index: src/frontends/qt2/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ChangeLog,v
retrieving revision 1.389.2.47
diff -u -p -r1.389.2.47 ChangeLog
--- src/frontends/qt2/ChangeLog	29 Apr 2004 15:57:11 -0000	1.389.2.47
+++ src/frontends/qt2/ChangeLog	5 May 2004 08:45:56 -0000
@@ -1,3 +1,8 @@
+2004-05-05  Angus Leeming  <[EMAIL PROTECTED]>
+
+	* QRef.C (redoRefs): Prevent widgets from emitting any signals
+	whilst we modify their state.
+
 2004-04-29  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
 	* Qt2Base.h (controller): gcc 3.4 compilation fix
Index: src/frontends/qt2/QRef.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QRef.C,v
retrieving revision 1.16
diff -u -p -r1.16 QRef.C
--- src/frontends/qt2/QRef.C	19 Dec 2002 01:10:41 -0000	1.16
+++ src/frontends/qt2/QRef.C	5 May 2004 08:45:57 -0000
@@ -151,7 +151,13 @@ void QRef::gotoRef()
 
 void QRef::redoRefs()
 {
+	// Prevent these widgets from emitting any signals whilst
+	// we modify their state.
+	dialog_->refsLB->blockSignals(true);
+	dialog_->referenceED->blockSignals(true);
+
 	dialog_->refsLB->setAutoUpdate(false);
+	dialog_->refsLB->clear();
 
 	// need this because Qt will send a highlight() here for
 	// the first item inserted
@@ -174,6 +180,10 @@ void QRef::redoRefs()
 
 	dialog_->refsLB->setAutoUpdate(true);
 	dialog_->refsLB->update();
+
+	// Re-activate the emission of signals by these widgets.
+	dialog_->refsLB->blockSignals(false);
+	dialog_->referenceED->blockSignals(false);
 }
 
 
Index: src/frontends/qt2/QRefDialog.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QRefDialog.C,v
retrieving revision 1.7
diff -u -p -r1.7 QRefDialog.C
--- src/frontends/qt2/QRefDialog.C	20 Oct 2002 01:48:28 -0000	1.7
+++ src/frontends/qt2/QRefDialog.C	5 May 2004 08:45:57 -0000
@@ -75,7 +75,6 @@ void QRefDialog::refSelected(const QStri
 void QRefDialog::sortToggled(bool on)
 {
 	form_->sort_ = on;
-	refsLB->clear();
 	form_->redoRefs();
 }
 
Index: src/frontends/xforms/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/ChangeLog,v
retrieving revision 1.661.2.15
diff -u -p -r1.661.2.15 ChangeLog
--- src/frontends/xforms/ChangeLog	29 Apr 2004 15:57:11 -0000	1.661.2.15
+++ src/frontends/xforms/ChangeLog	5 May 2004 08:46:03 -0000
@@ -1,3 +1,8 @@
+2004-05-04  Angus Leeming  <[EMAIL PROTECTED]>
+
+	* FormRef.C (input): don't activate the Apply buttons when using
+	widgets that don't change the data.
+
 2004-04-29  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
 	* FormBase.h (controller): gcc 3.4 compilation fix
Index: src/frontends/xforms/FormRef.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormRef.C,v
retrieving revision 1.62
diff -u -p -r1.62 FormRef.C
--- src/frontends/xforms/FormRef.C	27 Nov 2002 10:30:24 -0000	1.62
+++ src/frontends/xforms/FormRef.C	5 May 2004 08:46:04 -0000
@@ -258,6 +258,8 @@ ButtonPolicy::SMInput FormRef::input(FL_
 		updateBrowser(refs_);
 		fl_unfreeze_form(form());
 
+		activate = ButtonPolicy::SMI_NOOP;
+
 	} else if (ob == dialog_->choice_format) {
 
 		int const type = fl_get_choice(dialog_->choice_format) - 1;

Reply via email to