Bug Fix [ 1766180 ] Formatted Field input Bug
This commit is contained in:
parent
778bf5cf33
commit
bc96531709
|
@ -131,13 +131,18 @@ public final class MDocString extends PlainDocument implements CaretListener
|
||||||
throws BadLocationException
|
throws BadLocationException
|
||||||
{
|
{
|
||||||
// Max Length
|
// Max Length
|
||||||
// Begin - fer_luck @ centuryon
|
if (m_VFormat.length() == 0) {
|
||||||
// BugFix [ 1766180 ] Formatted Field input Bug
|
// non formatted strings
|
||||||
// // @Trifon - [ 1718897 ] User can enter more characters than max size field
|
// // @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;
|
return;
|
||||||
// End - fer_luck @ centuryon
|
} else {
|
||||||
|
// Formatted strings
|
||||||
|
// globalqss - Carlos Ruiz [ 1766180 ] Formatted Field input Bug
|
||||||
|
if (offset >= m_maxLength)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// We have no Format or inserted not manually (assuming correct Format)
|
// We have no Format or inserted not manually (assuming correct Format)
|
||||||
if (m_VFormat.length() == 0 || string.length() != 1)
|
if (m_VFormat.length() == 0 || string.length() != 1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue