CtrlLib: Fixed ReleaseCapture/LeftDown issue, ide: Fixed layout des duplicate when scrolled

git-svn-id: svn://ultimatepp.org/upp/trunk@7736 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-09-27 15:46:58 +00:00
parent 67898ebeae
commit 58a3f6e846
7 changed files with 9 additions and 4 deletions

View file

@ -977,9 +977,9 @@ void LayDes::Delete()
ReloadItems();
}
String LayDes::SaveSelection()
String LayDes::SaveSelection(bool scrolled)
{
return CurrentLayout().Save(cursor, ZPoint(sb).y) + "\r\n";
return CurrentLayout().Save(cursor, scrolled * ZPoint(sb).y) + "\r\n";
}
LayoutData LayDes::LoadLayoutData(const String& s)
@ -1023,7 +1023,7 @@ void LayDes::Duplicate()
return;
SaveState();
LayoutData& l = CurrentLayout();
LayoutData d = LoadLayoutData(SaveSelection());
LayoutData d = LoadLayoutData(SaveSelection(false));
int q = Max(cursor) + 1;
cursor.Clear();
for(int i = 0; i < d.item.GetCount(); i++) {