Add recenter and improve help

This commit is contained in:
Andreas Fabri 2010-09-23 14:42:13 +00:00
parent dae71df61b
commit 93712c46cd
1 changed files with 5 additions and 2 deletions

View File

@ -204,8 +204,11 @@ MainWindow::on_actionClear_triggered()
void void
MainWindow::on_actionRecenter_triggered() MainWindow::on_actionRecenter_triggered()
{ {
// this->graphicsView->setSceneRect(convert(square)); if(tree.empty()){
// this->graphicsView->fitInView(convert(square), Qt::KeepAspectRatio); return;
}
this->graphicsView->setSceneRect(pgi->boundingRect());
this->graphicsView->fitInView(pgi->boundingRect(), Qt::KeepAspectRatio);
} }
void void