Merge branch 'hotfix-1.4.1' into develop

This commit is contained in:
Jinhao 2017-03-21 04:15:51 +08:00
commit f983e4a610

View File

@ -2058,9 +2058,13 @@ namespace nana{ namespace widgets
{ {
auto text = system::dataexch{}.wget(); auto text = system::dataexch{}.wget();
//If it is required check the acceptable if ((accepts::no_restrict == impl_->capacities.acceptive) || !impl_->capacities.pred_acceptive)
if ((accepts::no_restrict != impl_->capacities.acceptive) || impl_->capacities.pred_acceptive)
{ {
put(move(text));
return;
}
//Check if the input is acceptable
for (auto i = text.begin(); i != text.end(); ++i) for (auto i = text.begin(); i != text.end(); ++i)
{ {
if (_m_accepts(*i)) if (_m_accepts(*i))
@ -2074,12 +2078,11 @@ namespace nana{ namespace widgets
if (accepts::no_restrict != impl_->capacities.acceptive) if (accepts::no_restrict != impl_->capacities.acceptive)
{ {
text.erase(i, text.end()); text.erase(i, text.end());
put(std::move(text)); put(move(text));
} }
break; break;
} }
} }
}
void text_editor::enter(bool record_undo) void text_editor::enter(bool record_undo)
{ {