fix a issue that children does not show when showing lite-widget

This commit is contained in:
Jinhao 2015-12-08 23:05:02 +08:00
parent 871ddd25af
commit ed58fcf85a

View File

@ -24,12 +24,12 @@ namespace nana
//class window_layout //class window_layout
void window_layout::paint(core_window_t* wd, bool is_redraw, bool is_child_refreshed) void window_layout::paint(core_window_t* wd, bool is_redraw, bool is_child_refreshed)
{ {
if (wd->flags.refreshing || wd->drawer.graphics.empty()) if (wd->flags.refreshing)
return; return;
if (nullptr == wd->effect.bground) if (nullptr == wd->effect.bground)
{ {
if (is_redraw) if (is_redraw && (!wd->drawer.graphics.empty()))
{ {
wd->flags.refreshing = true; wd->flags.refreshing = true;
wd->drawer.refresh(); wd->drawer.refresh();
@ -305,7 +305,10 @@ namespace nana
void window_layout::_m_paint_glass_window(core_window_t* wd, bool is_redraw, bool is_child_refreshed, bool called_by_notify, bool notify_other) void window_layout::_m_paint_glass_window(core_window_t* wd, bool is_redraw, bool is_child_refreshed, bool called_by_notify, bool notify_other)
{ {
if (wd->flags.refreshing && is_redraw) return; //A window which has an empty graphics(and lite-widget) does not notify
//glass windows for updating their background.
if ((wd->flags.refreshing && is_redraw) || wd->drawer.graphics.empty())
return;
nana::rectangle vr; nana::rectangle vr;
if (read_visual_rectangle(wd, vr)) if (read_visual_rectangle(wd, vr))