mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
Fix minor bug involving overlapping citation strings.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18455 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a9a3b79528
commit
9ad8985149
@ -258,14 +258,16 @@ void QCitationDialog::fillStyles()
|
||||
bool QCitationDialog::isSelected(const QModelIndex & idx)
|
||||
{
|
||||
QString const str = idx.data().toString();
|
||||
return !form_->selected()->stringList().filter(str).isEmpty();
|
||||
return form_->selected()->stringList().contains(str);
|
||||
}
|
||||
|
||||
|
||||
void QCitationDialog::setButtons()
|
||||
{
|
||||
int const arows = availableLV->model()->rowCount();
|
||||
addPB->setEnabled(arows>0 && !isSelected(availableLV->currentIndex()));
|
||||
addPB->setEnabled(arows > 0 &&
|
||||
availableLV->currentIndex().isValid() &&
|
||||
!isSelected(availableLV->currentIndex()));
|
||||
|
||||
int const srows = selectedLV->model()->rowCount();
|
||||
int const sel_nr = selectedLV->currentIndex().row();
|
||||
|
Loading…
Reference in New Issue
Block a user