Browse Source

set_card_decal() should invalidate

David Rose 20 years ago
parent
commit
d78f7097a8
2 changed files with 4 additions and 2 deletions
  1. 1 0
      panda/src/text/textNode.I
  2. 3 2
      panda/src/text/textNode.cxx

+ 1 - 0
panda/src/text/textNode.I

@@ -501,6 +501,7 @@ set_card_decal(bool card_decal) {
   } else {
   } else {
     _flags &= ~F_card_decal;
     _flags &= ~F_card_decal;
   }
   }
+  invalidate_no_measure();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////

+ 3 - 2
panda/src/text/textNode.cxx

@@ -315,10 +315,11 @@ generate() {
 
 
   if (has_card()) {
   if (has_card()) {
     PT(PandaNode) card_root;
     PT(PandaNode) card_root;
-    if (has_card_border())
+    if (has_card_border()) {
       card_root = make_card_with_border();
       card_root = make_card_with_border();
-    else
+    } else {
       card_root = make_card();
       card_root = make_card();
+    }
     card_root->set_transform(transform);
     card_root->set_transform(transform);
     card_root->set_attrib(ColorAttrib::make_flat(get_card_color()));
     card_root->set_attrib(ColorAttrib::make_flat(get_card_color()));
     if (get_card_color()[3] != 1.0f) {
     if (get_card_color()[3] != 1.0f) {