refine code

fix bug that listbox may throw std::runtime when the modal is enabled
fix bug that textbox attachs a wrong event angent
This commit is contained in:
Jinhao
2016-08-10 01:46:13 +08:00
parent 185a2961d1
commit 6e86b6ae6c
44 changed files with 1120 additions and 1013 deletions

View File

@@ -70,7 +70,7 @@ namespace nana
auto ts = detail::text_extent_size(dw, ent.begin, ent.end - ent.begin);
if(ts.height > pixels) pixels = ts.height;
lenpx += ts.width;
widths.push_back(ts.width);
widths.emplace_back(ts.width);
}
pos.x += (endpos - pos.x - static_cast<int>(lenpx))/2;
@@ -199,7 +199,7 @@ namespace nana
{
nana::size ts = detail::text_extent_size(dw, i.begin, i.end - i.begin);
if(ts.height > pixels) pixels = ts.height;
ts_keeper.push_back(ts);
ts_keeper.emplace_back(ts);
str_w += ts.width;
}
@@ -417,7 +417,7 @@ namespace nana
for(auto & i : reordered)
{
nana::size ts = detail::text_extent_size(dw, i.begin, i.end - i.begin);
ts_keeper.push_back(ts);
ts_keeper.emplace_back(ts);
str_w += ts.width;
}