Jelajahi Sumber

oops. Inverse logic in adjust_region

Cary Sandvig 25 tahun lalu
induk
melakukan
52d5db9c15
2 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 1 1
      panda/src/gui/guiButton.cxx
  2. 1 1
      panda/src/gui/guiRollover.cxx

+ 1 - 1
panda/src/gui/guiButton.cxx

@@ -285,7 +285,7 @@ void GuiButton::adjust_region(void) {
 	     _right, _bottom, _top);
 	     _right, _bottom, _top);
   gui_cat->debug() << "in adjust_region, base values (" << _left << ", "
   gui_cat->debug() << "in adjust_region, base values (" << _left << ", "
 		   << _right << ", " << _bottom << ", " << _top << ")" << endl;
 		   << _right << ", " << _bottom << ", " << _top << ")" << endl;
-  if (_alt_root.is_null()) {
+  if (!(_alt_root.is_null())) {
     // adjust for graph transform
     // adjust for graph transform
     LMatrix4f m;
     LMatrix4f m;
     this->get_graph_mat(m);
     this->get_graph_mat(m);

+ 1 - 1
panda/src/gui/guiRollover.cxx

@@ -70,7 +70,7 @@ void GuiRollover::adjust_region(void) {
   GetExtents(_off, _on, _left, _right, _bottom, _top);
   GetExtents(_off, _on, _left, _right, _bottom, _top);
   gui_cat->debug() << "in adjust_region, base values (" << _left << ", "
   gui_cat->debug() << "in adjust_region, base values (" << _left << ", "
 		   << _right << ", " << _bottom << ", " << _top << ")" << endl;
 		   << _right << ", " << _bottom << ", " << _top << ")" << endl;
-  if (_alt_root.is_null()) {
+  if (!(_alt_root.is_null())) {
     // adjust for graph transform
     // adjust for graph transform
     LMatrix4f m;
     LMatrix4f m;
     this->get_graph_mat(m);
     this->get_graph_mat(m);