Browse Source

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

Kolja Strohm 5 years ago
parent
commit
99733b7c55
1 changed files with 5 additions and 2 deletions
  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() ) );
 }