Implement FR#2707442: "GUI: Improve Mass Add dialog"
svn-id: r41263
This commit is contained in:
parent
41505a00d0
commit
f2547eb62c
7 changed files with 63 additions and 5 deletions
|
@ -133,6 +133,11 @@ void ListWidget::setList(const StringList &list) {
|
|||
scrollBarRecalc();
|
||||
}
|
||||
|
||||
void ListWidget::append(const String &s) {
|
||||
_list.push_back(s);
|
||||
scrollBarRecalc();
|
||||
}
|
||||
|
||||
void ListWidget::scrollTo(int item) {
|
||||
int size = _list.size();
|
||||
if (item >= size)
|
||||
|
@ -445,6 +450,18 @@ void ListWidget::scrollToCurrent() {
|
|||
_scrollBar->recalc();
|
||||
}
|
||||
|
||||
void ListWidget::scrollToEnd() {
|
||||
if (_currentPos + _entriesPerPage < (int)_list.size()) {
|
||||
_currentPos = _list.size() - _entriesPerPage;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
_scrollBar->_currentPos = _currentPos;
|
||||
_scrollBar->recalc();
|
||||
_scrollBar->draw();
|
||||
}
|
||||
|
||||
void ListWidget::startEditMode() {
|
||||
if (_editable && !_editMode && _selectedItem >= 0) {
|
||||
_editMode = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue