From 709960ff662b262134b52036885902579c0c6430 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Sat, 12 Jan 2008 11:49:49 +0000 Subject: [PATCH] * GuiBibtex.cpp: - yet another tweak to button enabling. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22512 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiBibtex.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt4/GuiBibtex.cpp b/src/frontends/qt4/GuiBibtex.cpp index 4babe2cdda..8f77975163 100644 --- a/src/frontends/qt4/GuiBibtex.cpp +++ b/src/frontends/qt4/GuiBibtex.cpp @@ -109,6 +109,8 @@ GuiBibtex::GuiBibtex(GuiView & lv) bc().addReadOnly(deletePB); bc().addReadOnly(upPB); bc().addReadOnly(downPB); + // Delete/Up/Down are handled with more conditions in + // databaseChanged(). // Make sure the delete/up/down buttons are disabled if necessary. databaseChanged(); @@ -265,8 +267,10 @@ void GuiBibtex::downPressed() void GuiBibtex::databaseChanged() { deletePB->setEnabled(!isBufferReadonly() && databaseLW->currentRow() != -1); - upPB->setEnabled(!isBufferReadonly() && databaseLW->count() > 1 && databaseLW->currentRow() > 0); - downPB->setEnabled(!isBufferReadonly() && databaseLW->count() > 1 && databaseLW->currentRow() < databaseLW->count() - 1); + upPB->setEnabled(!isBufferReadonly() && databaseLW->count() > 1 && + databaseLW->currentRow() > 0); + downPB->setEnabled(!isBufferReadonly() && databaseLW->count() > 1 && + databaseLW->currentRow() < databaseLW->count() - 1); } -- 2.39.2