Set MainTabKey when workspace is opened/added
- Issue MatterHackers/MCCentral#5383 MatterControl fails to switch to printer tab
This commit is contained in:
parent
da7dcd43f9
commit
b6b3ad5f6e
1 changed files with 5 additions and 0 deletions
|
|
@ -405,6 +405,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
bool isPrinter = activePrinter?.Settings.PrinterSelected == true;
|
||||
ChromeTab newTab = isPrinter ? CreatePrinterTab(workspace, theme) : CreatePartTab(workspace);
|
||||
|
||||
if (e.Operation == WorkspacesChangedEventArgs.OperationType.Add)
|
||||
{
|
||||
ApplicationController.Instance.MainTabKey = newTab.Key;
|
||||
}
|
||||
|
||||
// Activate tab with previously active key
|
||||
if (newTab.Key == ApplicationController.Instance.MainTabKey)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue