Handle cases when need to resize the scene size.

This commit is contained in:
Roman Telezhynskyi 2021-08-27 18:34:37 +03:00
parent cf75f88fcb
commit 9ceabab131
2 changed files with 10 additions and 0 deletions

View File

@ -682,4 +682,6 @@ void VPMainGraphicsView::on_PieceSheetChanged(const VPPiecePtr &piece)
}
scene()->addItem(_graphicsPiece);
}
VMainGraphicsView::NewSceneRect(scene(), this);
}

View File

@ -799,6 +799,7 @@ void VPMainWindow::InitPropertyTabTiles()
LayoutWasSaved(false);
m_tileFactory->refreshTileInfos();
m_graphicsView->RefreshLayout();
VMainGraphicsView::NewSceneRect(m_graphicsView->scene(), m_graphicsView);
}
});
@ -810,6 +811,7 @@ void VPMainWindow::InitPropertyTabTiles()
m_layout->LayoutSettings().SetShowTiles(checked);
LayoutWasSaved(false);
m_graphicsView->RefreshLayout();
VMainGraphicsView::NewSceneRect(m_graphicsView->scene(), m_graphicsView);
}
});
}
@ -1785,6 +1787,8 @@ void VPMainWindow::SheetPaperSizeChanged()
sheet->ValidatePiecesOutOfBound();
}
}
VMainGraphicsView::NewSceneRect(m_graphicsView->scene(), m_graphicsView);
}
//---------------------------------------------------------------------------------------------------------------------
@ -1799,6 +1803,8 @@ void VPMainWindow::TilePaperSizeChanged()
ui->toolButtonTileLandscapeOrientation->blockSignals(true);
ui->toolButtonTileLandscapeOrientation->setChecked(not portrait);
ui->toolButtonTileLandscapeOrientation->blockSignals(false);
VMainGraphicsView::NewSceneRect(m_graphicsView->scene(), m_graphicsView);
}
//---------------------------------------------------------------------------------------------------------------------
@ -2342,6 +2348,8 @@ void VPMainWindow::on_TilesMarginChanged()
m_tileFactory->refreshTileInfos();
m_graphicsView->RefreshLayout();
}
VMainGraphicsView::NewSceneRect(m_graphicsView->scene(), m_graphicsView);
}
//---------------------------------------------------------------------------------------------------------------------