don't use obsolete inSort()

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6712 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2003-04-03 21:50:36 +00:00
parent ee01ede042
commit 5156b111a5
3 changed files with 6 additions and 7 deletions

View File

@ -3,7 +3,7 @@
* QRefDialog.h:
* QRefDialog.C: set focus on the refs list. Don't
use "Goto" jargon. Add some accelerators. Make return/click
on a reference close the dialog.
on a reference close the dialog. Don't use obsolete inSort()
2003-04-01 John Levon <levon@movementarian.org>

View File

@ -152,6 +152,7 @@ void QRef::gotoRef()
void QRef::redoRefs()
{
dialog_->refsLB->setAutoUpdate(false);
dialog_->refsLB->clear();
// need this because Qt will send a highlight() here for
// the first item inserted
@ -159,12 +160,12 @@ void QRef::redoRefs()
for (std::vector<string>::const_iterator iter = refs_.begin();
iter != refs_.end(); ++iter) {
if (sort_)
dialog_->refsLB->inSort(toqstr(*iter));
else
dialog_->refsLB->insertItem(toqstr(*iter));
dialog_->refsLB->insertItem(toqstr(*iter));
}
if (sort_)
dialog_->refsLB->sort();
dialog_->referenceED->setText(tmp);
for (unsigned int i = 0; i < dialog_->refsLB->count(); ++i) {
@ -182,7 +183,6 @@ void QRef::updateRefs()
refs_.clear();
if (at_ref_)
gotoRef();
dialog_->refsLB->clear();
string const name = controller().getBufferName(dialog_->bufferCO->currentItem());
refs_ = controller().getLabelList(name);
dialog_->sortCB->setEnabled(!refs_.empty());

View File

@ -82,7 +82,6 @@ void QRefDialog::refSelected(const QString &)
void QRefDialog::sortToggled(bool on)
{
form_->sort_ = on;
refsLB->clear();
form_->redoRefs();
}