+2004-03-05 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
+
+ * QDocumentDialog.C (branches): Don't deselect branch
+ after button press.
+ * QBranch.C: fix off-by-one-error.
+
2004-02-21 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* QPrefs.C, QPrefsDialog.C, ui/QPrefPathsModule.ui: remove
const_iterator const begin = branchlist.begin();
const_iterator const end = branchlist.end();
- int id = 1;
- int count = 1;
+ int id = 0;
+ int count = 0;
for (const_iterator it = begin; it != end; ++it, ++count) {
string const & branch = it->getBranch();
dialog_->branchCO->insertItem(toqstr(branch));
void QDocumentDialog::updateBranchView()
{
+ // store the selected branch
+ QListViewItem * selItem =
+ branchesModule->branchesLV->selectedItem();
+ QString sel_branch;
+ if (selItem != 0)
+ sel_branch = selItem->text(0);
+
branchesModule->branchesLV->clear();
BranchList::const_iterator it = form_->branchlist_.begin();
coloritem.fill(itemcolor);
newItem->setPixmap(2, coloritem);
}
+ // restore selected branch
+ if (bname == sel_branch)
+ branchesModule->branchesLV->setSelected(newItem, true);
}
form_->changed();
}