Explorar o código

UIDialog passt seine größe jetzt so an, dass nurnoch die sichtbaren objekte in den dialog passen

Kolja Strohm %!s(int64=6) %!d(string=hai) anos
pai
achega
99733b7c55
Modificáronse 1 ficheiros con 5 adicións e 2 borrados
  1. 5 2
      UIDialog.cpp

+ 5 - 2
UIDialog.cpp

@@ -44,8 +44,11 @@ void UIDialog::adjustSize()
     Punkt max = Punkt( 0, 0 );
     for( auto m = getMembers(); m; m++ )
     {
-        max.x = MAX( max.x, m->getX() + m->getBreite() + 5 );
-        max.y = MAX( max.y, m->getY() + m->getHeight() + 5 );
+        if( m->hatStyle( Zeichnung::Style::Sichtbar ) )
+        {
+            max.x = MAX( max.x, m->getX() + m->getBreite() + 5 );
+            max.y = MAX( max.y, m->getY() + m->getHeight() + 5 );
+        }
     }
     setSize( max + Punkt( getRBreite() * 2, getRBreite() * 2 + zTTextFeld()->getHeight() ) );
 }