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

@ -134,6 +134,7 @@ void ColumnList::LeftUp(Point p, dword flags)
Refresh();
SyncInfo();
}
ReleaseCapture();
}
void ColumnList::LeftDrag(Point p, dword keyflags)

View file

@ -281,6 +281,7 @@ void DocEdit::LeftUp(Point p, dword flags)
SetFocus();
}
selclick = false;
ReleaseCapture();
}
void DocEdit::MouseMove(Point p, dword flags) {

View file

@ -598,6 +598,7 @@ void LineEdit::LeftUp(Point p, dword flags)
SetFocus();
}
selclick = false;
ReleaseCapture();
}
void LineEdit::RightDown(Point p, dword flags)

View file

@ -107,6 +107,7 @@ void SliderCtrl::LeftUp(Point pos, dword keyflags)
if (HasCapture())
WhenSlideFinish();
Refresh();
ReleaseCapture();
}
void SliderCtrl::MouseMove(Point pos, dword keyflags)

View file

@ -128,6 +128,7 @@ int Splitter::FindIndex(Point client) const {
void Splitter::LeftUp(Point p, dword keyflags) {
if(HasCapture())
WhenSplitFinish();
ReleaseCapture();
Refresh();
}

View file

@ -388,7 +388,7 @@ private:
LayoutItem& CurrentItem();
void ItemClick();
String SaveSelection();
String SaveSelection(bool scrolled = false);
LayoutData LoadLayoutData(const String& s);
void Undo();

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++) {