changeset 105:1b5887a3bb1c

setField() needs to dirty the modified screen positions
author Carl Byington <carl@five-ten-sg.com>
date Wed, 18 Jun 2014 10:36:46 -0700
parents 171e0a977544
children 12425771714d
files src/org/tn5250j/framework/tn5250/Screen5250.java
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/org/tn5250j/framework/tn5250/Screen5250.java	Wed Jun 18 10:10:14 2014 -0700
+++ b/src/org/tn5250j/framework/tn5250/Screen5250.java	Wed Jun 18 10:36:46 2014 -0700
@@ -2684,19 +2684,21 @@
     }
 
     /*
-     * set the content of the field at (l,c) to d
-     * if l == -1, set the current field contents to d
+     * set the content of the field at (l,c) to data
+     * if l == -1, set the current field contents to data
      */
-    public void setField(int l, int c, char [] d) {
+    public void setField(int l, int c, char [] data) {
         ScreenField cf;
         if (l >= 0) {
             int position = l * numCols + c;
             isInField(position, true);
         }
-        if ((d != null) && (d.length > 0)) {
+        if ((data != null) && (data.length > 0)) {
             cf = screenFields.getCurrentField();
-            cf.setString(new String(d));
+            cf.setString(new String(data));
             lastPos = cf.getStartPos();
+            setDirty(lastPos);
+            setDirty(lastPos + df.getLength());
         }
         updateDirty();
     }