[ 1766180 ] Formatted Field input Bug

Fields with defined format in the column screen are not working correctly.
This commit is contained in:
fer_luck 2007-08-02 14:11:17 +00:00
parent 93cf04ae17
commit 778bf5cf33
1 changed files with 5 additions and 1 deletions

View File

@ -131,9 +131,13 @@ public final class MDocString extends PlainDocument implements CaretListener
throws BadLocationException
{
// Max Length
// Begin - fer_luck @ centuryon
// BugFix [ 1766180 ] Formatted Field input Bug
// // @Trifon - [ 1718897 ] User can enter more characters than max size field
if (getLength() + string.length() > m_maxLength)
// if (getLength() + string.length() > m_maxLength)
if (((String)this.getText().replace(" ", "")).length() + string.length() > m_maxLength)
return;
// End - fer_luck @ centuryon
// We have no Format or inserted not manually (assuming correct Format)
if (m_VFormat.length() == 0 || string.length() != 1)
{