fix issue that textbox&spinbox don't update immediately

This commit is contained in:
Jinhao 2017-06-08 00:44:27 +08:00
parent d384a6a8e7
commit bd38e96ed7
2 changed files with 8 additions and 2 deletions

View File

@ -441,7 +441,10 @@ namespace nana
text = to_wstring(modifier_.prefix + range_->value() + modifier_.suffix); text = to_wstring(modifier_.prefix + range_->value() + modifier_.suffix);
if (editor_->text() != text) if (editor_->text() != text)
{
editor_->text(text, false); editor_->text(text, false);
editor_->try_refresh();
}
_m_draw_spins(spin_stated_); _m_draw_spins(spin_stated_);
} }
@ -736,7 +739,8 @@ namespace nana
if (editor) if (editor)
{ {
editor->text(to_wstring(text), false); editor->text(to_wstring(text), false);
API::refresh_window(*this); if (editor->try_refresh())
API::update_window(*this);
} }
} }
}//end namespace nana }//end namespace nana

View File

@ -738,7 +738,9 @@ namespace drawerbase {
if (editor) if (editor)
{ {
editor->text(to_wstring(str), false); editor->text(to_wstring(str), false);
API::update_window(this->handle());
if (editor->try_refresh())
API::update_window(this->handle());
} }
} }