| 1343 | } |
| 1344 | |
| 1345 | void PartStack::ShowPart(LayoutPart::Pointer part, Object::Pointer cookie) |
| 1346 | { |
| 1347 | |
| 1348 | if (this->GetPresentation() == 0) |
| 1349 | { |
| 1350 | return; |
| 1351 | } |
| 1352 | |
| 1353 | if (part->IsPlaceHolder()) |
| 1354 | { |
| 1355 | part->SetContainer(ILayoutContainer::Pointer(this)); |
| 1356 | return; |
| 1357 | } |
| 1358 | |
| 1359 | if (part.Cast<PartPane>() == 0) |
| 1360 | { |
| 1361 | WorkbenchPlugin::Log("Incorrect part " + part->GetID() + "contained in a part stack"); |
| 1362 | return; |
| 1363 | } |
| 1364 | |
| 1365 | PartPane::Pointer pane = part.Cast<PartPane>(); |
| 1366 | |
| 1367 | PresentablePart::Pointer presentablePart(new PresentablePart(pane, Tweaklets::Get(GuiWidgetsTweaklet::KEY)->GetParent(this->GetControl()))); |
| 1368 | presentableParts.push_back(presentablePart); |
| 1369 | |
| 1370 | if (isActive) |
| 1371 | { |
| 1372 | part->SetContainer(ILayoutContainer::Pointer(this)); |
| 1373 | |
| 1374 | // The active part should always be enabled |
| 1375 | if (part->GetControl() != nullptr) |
| 1376 | Tweaklets::Get(GuiWidgetsTweaklet::KEY)->SetEnabled(part->GetControl(), true); |
| 1377 | } |
| 1378 | |
| 1379 | presentationSite->GetPresentation()->AddPart(presentablePart, cookie); |
| 1380 | |
| 1381 | if (requestedCurrent == 0) |
| 1382 | { |
| 1383 | this->SetSelection(pane); |
| 1384 | } |
| 1385 | |
| 1386 | // if (childObscuredByZoom(part)) |
| 1387 | // { |
| 1388 | // presentablePart.enableInputs(false); |
| 1389 | // } |
| 1390 | } |
| 1391 | |
| 1392 | void PartStack::UpdateContainerVisibleTab() |
| 1393 | { |
no test coverage detected