ide: IconDes scrollbar position retained #671

git-svn-id: svn://ultimatepp.org/upp/trunk@6835 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-01-31 07:51:04 +00:00
commit 9d91e26422
6 changed files with 5 additions and 6 deletions

View file

@ -17,7 +17,7 @@ IconDes::EditPos IconDes::GetEditPos()
{
EditPos e;
e.cursor = list.GetCursor();
e.sc = list.GetCursorSc();
e.sc = list.GetScroll();
e.slot.Clear();
e.slot.SetCount(slot.GetCount());
for(int i = 0; i < slot.GetCount(); i++) {
@ -53,10 +53,9 @@ void IconDes::SetEditPos(const EditPos& e)
}
if(e.cursor >= 0 && e.cursor < list.GetCount()) {
list.SetCursor(e.cursor);
list.ScCursor(e.sc);
list.ScrollTo(e.sc);
}
}
list.ScrollIntoCursor();
SyncImage();
}