]> git.lyx.org Git - features.git/commitdiff
Fix for qt2 citation dialog crash when selecting first key
authorAngus Leeming <leeming@lyx.org>
Sun, 17 Jun 2001 13:22:56 +0000 (13:22 +0000)
committerAngus Leeming <leeming@lyx.org>
Sun, 17 Jun 2001 13:22:56 +0000 (13:22 +0000)
of available bibliography keys.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2135 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/FormCitation.C
src/frontends/qt2/FormCitationDialogImpl.C
src/frontends/xforms/FormCitation.C

index 76669d5d32e1c2b81984f5a4a59dafde242110ef..5463cc9080838650b7dbdf8b93945795158ba7df 100644 (file)
@@ -1,3 +1,13 @@
+2001-06-17  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * FormCitation.C (build): removed bc().refresh() call as the controller
+       should take care of this.
+       (update): removed noKeys stuff as you don't use it.
+
+       * FormCitationDialogImpl.C (slotBibSelected): Can't select bibkeys[-1]!
+       We were being bit by the xforms browser returns the browser line number
+       in Fortran style, but Qt uses C-style.
+
 2001-06-16  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * FormCitationDialogImpl.C: added using directive.
index 4c6bd68f1c315bc8b54941724d7b27e97df4eb45..82aa96b102ee3ac94fce78ecbe0a80b12db918ab 100644 (file)
@@ -88,8 +88,6 @@ void FormCitation::build()
        bc().addReadOnly(dialog_->citationStyleCO);
        bc().addReadOnly(dialog_->textBeforeED);
        bc().addReadOnly(dialog_->textAfterED);
-
-       bc().refresh();
 }      
 
 
@@ -108,11 +106,6 @@ void FormCitation::update()
        setBibButtons(OFF);
        setCiteButtons(OFF);
 
-       int noKeys = int(max(bibkeys.size(), citekeys.size()));
-
-       // Place bounds, so that 4 <= noKeys <= 10
-       noKeys = max(4, min(10, noKeys));
-
        dialog_->textAfterED->setText( controller().params().getOptions().c_str());
 }
 
index bf616e0658be4dcc712e7462945fc116a81e9303..891f7ba8439e652fc2f6d0f969d849014d853474 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * $Id: FormCitationDialogImpl.C,v 1.8 2001/06/16 14:48:12 leeming Exp $
+ * $Id: FormCitationDialogImpl.C,v 1.9 2001/06/17 13:22:55 leeming Exp $
  */
 
 #include <config.h>
@@ -73,7 +73,7 @@ void FormCitationDialogImpl::slotBibSelected( int sel )
     infoML->clear();
 
     infoML->setText( biblio::getInfo( theMap,
-                                     form_->bibkeys[sel-1] ).c_str() );
+                                     form_->bibkeys[sel] ).c_str() );
 
     // Highlight the selected browser_bib key in browser_cite if
     // present
index c31010064b179796e3c2d9b6f1f4eeb29714b226..a66ac30a0ec5492d71306b776044147bd9af60e1 100644 (file)
@@ -84,7 +84,6 @@ void FormCitation::build()
        bc().addReadOnly(dialog_->choice_style);
        bc().addReadOnly(dialog_->input_before);
        bc().addReadOnly(dialog_->input_after);
-
 }