mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
fix listbox insert algorithmus
svn path=/trunk/; revision=15222
This commit is contained in:
parent
8ece706e06
commit
4358dbd01a
2 changed files with 7 additions and 5 deletions
|
@ -85,7 +85,7 @@ Pane::Pane(HWND hparent, int id, int id_header, Entry* root, bool treePane, int
|
|||
Entry* entry = _root;
|
||||
|
||||
if (entry)
|
||||
insert_entries(entry, -1);
|
||||
insert_entries(entry);
|
||||
|
||||
init();
|
||||
|
||||
|
@ -657,12 +657,12 @@ void Pane::calc_tabbed_width(LPDRAWITEMSTRUCT dis, int col, LPCTSTR str)
|
|||
|
||||
// insert listbox entries after index idx
|
||||
|
||||
void Pane::insert_entries(Entry* dir, int idx)
|
||||
int Pane::insert_entries(Entry* dir, int idx)
|
||||
{
|
||||
Entry* entry = dir;
|
||||
|
||||
if (!entry)
|
||||
return;
|
||||
return idx;
|
||||
|
||||
for(; entry; entry=entry->_next) {
|
||||
#ifndef _LEFT_FILES
|
||||
|
@ -685,8 +685,10 @@ void Pane::insert_entries(Entry* dir, int idx)
|
|||
ListBox_InsertItemData(_hwnd, idx, entry);
|
||||
|
||||
if (_treePane && entry->_expanded)
|
||||
insert_entries(entry->_down, idx);
|
||||
idx = insert_entries(entry->_down, idx);
|
||||
}
|
||||
|
||||
return idx;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ struct Pane : public SubclassedWindow
|
|||
void calc_single_width(int col);
|
||||
void draw_item(LPDRAWITEMSTRUCT dis, Entry* entry, int calcWidthCol=-1);
|
||||
|
||||
void insert_entries(Entry* dir, int idx=-1);
|
||||
int insert_entries(Entry* dir, int idx=-1);
|
||||
BOOL command(UINT cmd);
|
||||
int Notify(int id, NMHDR* pnmh);
|
||||
|
||||
|
|
Loading…
Reference in a new issue