MCPcopy Create free account
hub / github.com/BehaviorTree/Groot / zoomHomeView

Method zoomHomeView

bt_editor/graphic_container.cpp:166–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void GraphicContainer::zoomHomeView()
167{
168 QRectF rect = _scene->itemsBoundingRect();
169 rect.setBottom( rect.top() + rect.height()* 1.2 );
170
171 const int min_height = 300;
172 if( rect.height() < min_height )
173 {
174 rect.setBottom( rect.top() + min_height );
175 }
176
177 _view->setSceneRect (rect);
178 _view->fitInView(rect, Qt::KeepAspectRatio);
179 _view->scale(0.9, 0.9);
180}
181
182bool GraphicContainer::containsValidTree() const
183{

Callers 3

createTabMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected