mirror of
https://github.com/leozide/leocad
synced 2025-01-28 19:58:12 +01:00
Fixed crash when deleting a submodel being edited in another view.
This commit is contained in:
parent
8f59a67924
commit
3128a078cb
1 changed files with 5 additions and 1 deletions
|
@ -1512,10 +1512,14 @@ void lcMainWindow::RemoveView(View* View)
|
|||
void lcMainWindow::SetActiveView(View* ActiveView)
|
||||
{
|
||||
lcModelTabWidget* TabWidget = GetTabForView(ActiveView);
|
||||
View* CurrentActiveView = TabWidget->GetActiveView();
|
||||
|
||||
if (!TabWidget || TabWidget->GetActiveView() == ActiveView)
|
||||
if (!TabWidget || CurrentActiveView == ActiveView)
|
||||
return;
|
||||
|
||||
if (CurrentActiveView)
|
||||
CurrentActiveView->SetTopSubmodelActive();
|
||||
|
||||
TabWidget->SetActiveView(ActiveView);
|
||||
|
||||
UpdateCameraMenu();
|
||||
|
|
Loading…
Add table
Reference in a new issue