mirror of
https://github.com/leozide/leocad
synced 2024-12-27 21:58:37 +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);
|
||||
|
||||
NewView = CreateView(Model);
|
||||
AddView(NewView);
|
||||
ViewWidget = (lcViewWidget*)TabWidget->layout()->itemAt(0)->widget();
|
||||
ViewWidget->SetView(NewView);
|
||||
AddView(NewView);
|
||||
|
||||
mModelTabWidget->setCurrentWidget(TabWidget);
|
||||
}
|
||||
|
@ -1654,8 +1654,6 @@ void lcMainWindow::AddView(View* View)
|
|||
|
||||
TabWidget->AddView(View);
|
||||
|
||||
View->MakeCurrent();
|
||||
|
||||
if (!TabWidget->GetActiveView())
|
||||
{
|
||||
TabWidget->SetActiveView(View);
|
||||
|
|
Loading…
Reference in a new issue