From 0b9dad040c7e92e028ead6686f7aa9de0299bd44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Fri, 5 Jan 2007 14:36:50 +0000 Subject: [PATCH] Fix bug 3057. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@16532 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt2/ChangeLog | 5 +++++ src/frontends/qt2/QCitationDialog.C | 1 + status.14x | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 15ebac3880..221904ca6a 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,8 @@ +2007-01-05 Jürgen Spitzmüller + + * QCitationDialog.C: Disallow pressing the add button in the citation + dialog when no citations are available, preventing a crash (bug 3057). + 2006-12-09 Enrico Forestieri * qfont_loader.[Ch] (width): rename WidthCache as MetricsCache. diff --git a/src/frontends/qt2/QCitationDialog.C b/src/frontends/qt2/QCitationDialog.C index 70a245e6de..35be000980 100644 --- a/src/frontends/qt2/QCitationDialog.C +++ b/src/frontends/qt2/QCitationDialog.C @@ -71,6 +71,7 @@ void QCitationDialog::setButtons() int const sel_nr = selectedLB->currentItem(); int const avail_nr = add_->availableLB->currentItem(); + addPB->setEnabled(add_->availableLB->count() != 0); add_->addPB->setEnabled(avail_nr >= 0); deletePB->setEnabled(sel_nr >= 0); upPB->setEnabled(sel_nr > 0); diff --git a/status.14x b/status.14x index 8999808aef..de45898ec1 100644 --- a/status.14x +++ b/status.14x @@ -113,6 +113,9 @@ What's new - Fix an undo crash crash with nested font changes in math (bug 3019). +- Disallow pressing the add button in the citation dialog when no citations + are available, preventing a crash (bug 3057). + - Fix deletion of empty paragraph in various situations: paragraphs with different layouts, layouts with KeepEmpty property, ERT insets, tabular cells (bugs 2587 and 2882).