Restore layout scene.
--HG-- branch : feature
This commit is contained in:
parent
e0b78f0f27
commit
46948a9fc4
|
@ -1338,6 +1338,8 @@ void MainWindow::ActionLayout(bool checked)
|
||||||
|
|
||||||
ui->dockWidgetLayoutPages->setVisible(true);
|
ui->dockWidgetLayoutPages->setVisible(true);
|
||||||
ui->dockWidgetToolOptions->setVisible(false);
|
ui->dockWidgetToolOptions->setVisible(false);
|
||||||
|
|
||||||
|
ShowPaper(ui->listWidget->currentRow());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2549,6 +2551,7 @@ QString MainWindow::PatternPieceName(const QString &text)
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
{
|
{
|
||||||
CancelTool();
|
CancelTool();
|
||||||
|
ClearLayout();
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)
|
||||||
delete lock; // Unlock pattern file
|
delete lock; // Unlock pattern file
|
||||||
|
@ -2743,7 +2746,7 @@ void MainWindow::ToolBarStyles()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void MainWindow::ShowPaper(int index)
|
void MainWindow::ShowPaper(int index)
|
||||||
{
|
{
|
||||||
if (index < 0 || index > scenes.size())
|
if (index < 0 || index >= scenes.size())
|
||||||
{
|
{
|
||||||
ui->view->setScene(tempSceneLayout);
|
ui->view->setScene(tempSceneLayout);
|
||||||
//EnableActions(false);
|
//EnableActions(false);
|
||||||
|
@ -2751,6 +2754,7 @@ void MainWindow::ShowPaper(int index)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui->view->setScene(scenes.at(index));
|
ui->view->setScene(scenes.at(index));
|
||||||
|
//EnableActions(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->view->fitInView(ui->view->scene()->sceneRect(), Qt::KeepAspectRatio);
|
ui->view->fitInView(ui->view->scene()->sceneRect(), Qt::KeepAspectRatio);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user