mirror of
https://github.com/leozide/leocad
synced 2024-12-28 22:23:35 +01:00
Crash fix restoring layout.
This commit is contained in:
parent
34d61040f6
commit
dcf8ddfd95
1 changed files with 1 additions and 3 deletions
|
@ -1618,9 +1618,9 @@ void lcMainWindow::SetCurrentModelTab(lcModel* Model)
|
||||||
TabWidget->SetModel(Model);
|
TabWidget->SetModel(Model);
|
||||||
|
|
||||||
NewView = CreateView(Model);
|
NewView = CreateView(Model);
|
||||||
|
AddView(NewView);
|
||||||
ViewWidget = (lcViewWidget*)TabWidget->layout()->itemAt(0)->widget();
|
ViewWidget = (lcViewWidget*)TabWidget->layout()->itemAt(0)->widget();
|
||||||
ViewWidget->SetView(NewView);
|
ViewWidget->SetView(NewView);
|
||||||
AddView(NewView);
|
|
||||||
|
|
||||||
mModelTabWidget->setCurrentWidget(TabWidget);
|
mModelTabWidget->setCurrentWidget(TabWidget);
|
||||||
}
|
}
|
||||||
|
@ -1654,8 +1654,6 @@ void lcMainWindow::AddView(View* View)
|
||||||
|
|
||||||
TabWidget->AddView(View);
|
TabWidget->AddView(View);
|
||||||
|
|
||||||
View->MakeCurrent();
|
|
||||||
|
|
||||||
if (!TabWidget->GetActiveView())
|
if (!TabWidget->GetActiveView())
|
||||||
{
|
{
|
||||||
TabWidget->SetActiveView(View);
|
TabWidget->SetActiveView(View);
|
||||||
|
|
Loading…
Reference in a new issue