Page MenuHomePhabricator

berryPerspectiveHelper.diff

Authored By
Truite
Aug 31 2016, 8:52 AM
Size
1 KB
Referenced Files
None
Subscribers
None

berryPerspectiveHelper.diff

diff --git "a/C:\\Users\\truite\\AppData\\Local\\Temp\\TortoiseGit\\ber35F2.tmp\\berryPerspectiveHelper-6da7380-left.cpp" "b/C:\\mitk\\msvc14_debug64\\Plugins\\org.blueberry.ui.qt\\src\\internal\\berryPerspectiveHelper.cpp"
index c4ee2ef..bfb8485 100644
--- "a/C:\\Users\\truite\\AppData\\Local\\Temp\\TortoiseGit\\ber35F2.tmp\\berryPerspectiveHelper-6da7380-left.cpp"
+++ "b/C:\\mitk\\msvc14_debug64\\Plugins\\org.blueberry.ui.qt\\src\\internal\\berryPerspectiveHelper.cpp"
@@ -1300,7 +1300,25 @@ void PerspectiveHelper::RemovePart(LayoutPart::Pointer part)
if (container != 0)
{
QString placeHolderId = part->GetPlaceHolderId();
- container->Replace(part, LayoutPart::Pointer(new PartPlaceholder(placeHolderId)));
+ QString secondaryId;
+ IViewReference::Pointer ref;
+ if (part.Cast<PartPane>() != 0)
+ {
+ PartPane::Pointer pane = part.Cast<PartPane>();
+ ref = pane->GetPartReference().Cast<IViewReference>();
+ if (ref != 0)
+ {
+ secondaryId = ref->GetSecondaryId();
+ }
+ }
+ if (secondaryId != "")
+ {
+ container->Replace(part, LayoutPart::Pointer(new PartPlaceholder(placeHolderId + QString(":") + secondaryId)));
+ }
+ else
+ {
+ container->Replace(part, LayoutPart::Pointer(new PartPlaceholder(placeHolderId)));
+ }
// // If the parent is root we're done. Do not try to replace
// // it with placeholder.

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2531
Default Alt Text
berryPerspectiveHelper.diff (1 KB)

Event Timeline