fix crash error when operate a closed treebox

This commit is contained in:
Jinhao 2017-07-17 00:37:30 +08:00
parent 87698de126
commit cb6191cc88
2 changed files with 6 additions and 0 deletions

View File

@ -140,6 +140,7 @@ namespace nana
private: private:
//Overrides drawer_trigger methods //Overrides drawer_trigger methods
void attached(widget_reference, graph_reference) override; void attached(widget_reference, graph_reference) override;
void detached() override;
void refresh(graph_reference) override; void refresh(graph_reference) override;
void dbl_click(graph_reference, const arg_mouse&) override; void dbl_click(graph_reference, const arg_mouse&) override;
void mouse_down(graph_reference, const arg_mouse&) override; void mouse_down(graph_reference, const arg_mouse&) override;

View File

@ -1781,6 +1781,11 @@ namespace nana
widget.caption("nana treebox"); widget.caption("nana treebox");
} }
void trigger::detached()
{
impl_->data.graph = nullptr;
}
void trigger::refresh(graph_reference) void trigger::refresh(graph_reference)
{ {
//Don't reset the scroll and update the window //Don't reset the scroll and update the window