]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
redraw textbox in SetText()
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 8 Jul 2008 14:53:14 +0000 (16:53 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 8 Jul 2008 14:53:14 +0000 (16:53 +0200)
textbox.c

index 873a23c948c13cc8c947215e7874e68ac0e611e2..6b83516ad77c33d1bbd86797ed62172ab29e2481 100644 (file)
--- a/textbox.c
+++ b/textbox.c
@@ -100,6 +100,7 @@ newtComponent newtTextbox(int left, int top, int width, int height, int flags) {
 
     co->ops = &textboxOps;
 
+    co->isMapped = 0;
     co->height = height;
     co->top = top;
     co->left = left;
@@ -330,6 +331,8 @@ void newtTextboxSetText(newtComponent co, const char * text) {
 
     free(expanded);
     
+    textboxDraw(co);
+
     newtTrashScreen();    
 }
 
@@ -350,6 +353,9 @@ static void textboxDraw(newtComponent c) {
     struct textbox * tb = c->data;
     int size;
 
+    if (!c->isMapped)
+           return;
+
     if (tb->sb) {
        size = tb->numLines - c->height;
        if (tb->isActive) {