mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
* 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
This commit is contained in:
parent
f78f28f4fc
commit
709960ff66
@ -109,6 +109,8 @@ GuiBibtex::GuiBibtex(GuiView & lv)
|
|||||||
bc().addReadOnly(deletePB);
|
bc().addReadOnly(deletePB);
|
||||||
bc().addReadOnly(upPB);
|
bc().addReadOnly(upPB);
|
||||||
bc().addReadOnly(downPB);
|
bc().addReadOnly(downPB);
|
||||||
|
// Delete/Up/Down are handled with more conditions in
|
||||||
|
// databaseChanged().
|
||||||
|
|
||||||
// Make sure the delete/up/down buttons are disabled if necessary.
|
// Make sure the delete/up/down buttons are disabled if necessary.
|
||||||
databaseChanged();
|
databaseChanged();
|
||||||
@ -265,8 +267,10 @@ void GuiBibtex::downPressed()
|
|||||||
void GuiBibtex::databaseChanged()
|
void GuiBibtex::databaseChanged()
|
||||||
{
|
{
|
||||||
deletePB->setEnabled(!isBufferReadonly() && databaseLW->currentRow() != -1);
|
deletePB->setEnabled(!isBufferReadonly() && databaseLW->currentRow() != -1);
|
||||||
upPB->setEnabled(!isBufferReadonly() && databaseLW->count() > 1 && databaseLW->currentRow() > 0);
|
upPB->setEnabled(!isBufferReadonly() && databaseLW->count() > 1 &&
|
||||||
downPB->setEnabled(!isBufferReadonly() && databaseLW->count() > 1 && databaseLW->currentRow() < databaseLW->count() - 1);
|
databaseLW->currentRow() > 0);
|
||||||
|
downPB->setEnabled(!isBufferReadonly() && databaseLW->count() > 1 &&
|
||||||
|
databaseLW->currentRow() < databaseLW->count() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user