git-svn-id: svn://ultimatepp.org/upp/trunk@330 f0d560ea-af0d-0410-9eb7-867de7ffcac7

This commit is contained in:
cxl 2008-08-15 09:33:15 +00:00
parent 605a77315f
commit f49ae74c89
90 changed files with 10807 additions and 9917 deletions

View file

@ -718,6 +718,12 @@ void LayDes::CreateCtrl(const String& _type)
LayoutItem& m = l.item.Insert(c);
m.Create(_type);
Point p = dragbase;
Size sza, szb;
GetZoomRatio(sza, szb);
if(sza.cx)
p.x = szb.cx * p.x / sza.cx;
if(sza.cy)
p.y = szb.cy * p.y / sza.cy;
if(usegrid) {
p.x = p.x / (int)~setting.gridx * (int)~setting.gridx;
p.y = p.y / (int)~setting.gridy * (int)~setting.gridy;