mirror of
https://github.com/leozide/leocad
synced 2025-01-28 19:58:12 +01:00
Force views to recalculate their sizes when they are created.
This commit is contained in:
parent
c47856e10c
commit
efe7dcba35
1 changed files with 8 additions and 1 deletions
|
@ -1200,6 +1200,7 @@ void lcMainWindow::SetCurrentModelTab(lcModel* Model)
|
|||
View* NewView = new View(Model);
|
||||
QWidget* ViewWidget = new lcQGLWidget(TabWidget, mPiecePreviewWidget, NewView, true);
|
||||
CentralLayout->addWidget(ViewWidget, 0, 0, 1, 1);
|
||||
ViewWidget->show();
|
||||
ViewWidget->setFocus();
|
||||
NewView->ZoomExtents();
|
||||
SetActiveView(NewView);
|
||||
|
@ -1475,7 +1476,13 @@ void lcMainWindow::ResetViews()
|
|||
QWidget* TopWidget = TabLayout->itemAt(0)->widget();
|
||||
TabLayout->removeWidget(TopWidget);
|
||||
TopWidget->deleteLater();
|
||||
TabLayout->addWidget(new lcQGLWidget(TabWidget, mPiecePreviewWidget, new View(lcGetActiveModel()), true));
|
||||
View* NewView = new View(lcGetActiveModel());
|
||||
QWidget* ViewWidget = new lcQGLWidget(TabWidget, mPiecePreviewWidget, NewView, true);
|
||||
TabLayout->addWidget(ViewWidget);
|
||||
ViewWidget->show();
|
||||
ViewWidget->setFocus();
|
||||
NewView->ZoomExtents();
|
||||
SetActiveView(NewView);
|
||||
}
|
||||
|
||||
void lcMainWindow::TogglePrintPreview()
|
||||
|
|
Loading…
Add table
Reference in a new issue