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

@@ -65,7 +65,6 @@ namespace drawerbase {
{
auto wd = wdg.handle();
widget_ = &wdg;
evt_agent_.reset(new event_agent(static_cast<::nana::textbox&>(wdg), editor_->text_position()));
auto scheme = API::dev::get_scheme(wdg);
@@ -73,6 +72,8 @@ namespace drawerbase {
editor_->textbase().set_event_agent(evt_agent_.get());
editor_->set_event(evt_agent_.get());
evt_agent_.reset(new event_agent(static_cast<::nana::textbox&>(wdg), editor_->text_position()));
_m_text_area(graph.width(), graph.height());
API::tabstop(wd);