Merge branch 'hotfix-1.7.2' into develop

This commit is contained in:
Jinhao
2019-12-04 01:13:44 +08:00
12 changed files with 949 additions and 630 deletions

View File

@@ -1522,7 +1522,7 @@ namespace nana
if (!*str)
{
targets.emplace_back(parent_path);
impl_->path = parent_path.parent_path().u8string();
impl_->path = parent_path.parent_path().string();
}
else
{
@@ -1532,7 +1532,7 @@ namespace nana
targets.emplace_back(parent_path / path_type{str});
str += (len + 1);
}
impl_->path = parent_path.u8string();
impl_->path = parent_path.string();
}
}
else
@@ -1540,7 +1540,7 @@ namespace nana
wfile.resize(std::wcslen(wfile.data()));
targets.emplace_back(wfile);
impl_->path = targets.front().parent_path().u8string();
impl_->path = targets.front().parent_path().string();
}
#elif defined(NANA_POSIX)

View File

@@ -1267,7 +1267,7 @@ namespace nana
auto files = impl->fbox.show();
if(!files.empty())
{
impl->value = files.front().u8string();
impl->value = files.front().string();
impl->path_edit.caption(impl->value);
}
});

View File

@@ -2401,7 +2401,9 @@ namespace nana
nana::rectangle r;
if (rect_lister(r))
{
auto top = new_where.second * item_h + header_visible_px();
//potential displacement due to partially visible first visible item
auto disp = origin.y - first_display().item * item_h;
auto top = new_where.second * item_h + header_visible_px() - disp;
if (checkarea(item_xpos(r), static_cast<int>(top)).is_hit(pos))
new_where.first = parts::checker;
}
@@ -6000,6 +6002,7 @@ namespace nana
{
internal_scope_guard lock;
_m_ess().lister.sort_column(col, &reverse);
_m_ess().update();
}
auto listbox::sort_col() const -> size_type

View File

@@ -1229,7 +1229,8 @@ namespace nana
void trigger::erase(std::size_t pos)
{
layouter_->erase(pos);
if (layouter_->erase(pos))
API::refresh_window(layouter_->widget_handle());
}
void trigger::tab_color(std::size_t i, bool is_bgcolor, const ::nana::color& clr)

View File

@@ -1274,7 +1274,10 @@ namespace nana
item_proxy item_proxy::operator++(int)
{
return sibling();
item_proxy ip(*this);
if(trigger_ && node_)
node_ = node_->next;
return ip;
}
item_proxy& item_proxy::operator*()
@@ -1952,7 +1955,7 @@ namespace nana
impl_->attr.tree_cont.for_each<item_locator&>(shape.first, nl);
auto const node = nl.node();
if (!node)
if (!node || !node->child)
return;
switch (nl.what())