diff --git a/src/gui/workspace/panel-manager.cpp b/src/gui/workspace/panel-manager.cpp
index 9df74186c..6d5ab5bc9 100644
--- a/src/gui/workspace/panel-manager.cpp
+++ b/src/gui/workspace/panel-manager.cpp
@@ -136,7 +136,7 @@ namespace workspace {
}
- void
+ panel::Panel&
PanelManager::showPanel (const int description_index)
{
// Try and find the panel and present it if possible
@@ -149,9 +149,9 @@ namespace workspace {
if (!panel->is_shown()) panel->show();
Gdl::DockItem &dock_item = panel->getDockItem();
- // ENSURE(dock_item);
dock_item.present(dock_);
- return;
+ ENSURE (panel);
+ return *panel;
}
}
@@ -160,6 +160,9 @@ namespace workspace {
// Dock the item
dock_.add_item(new_panel->getDockItem(), Gdl::DOCK_FLOATING);
+
+ ENSURE (new_panel);
+ return *new_panel;
}
diff --git a/src/gui/workspace/panel-manager.hpp b/src/gui/workspace/panel-manager.hpp
index 3608618a5..e78a87716 100644
--- a/src/gui/workspace/panel-manager.hpp
+++ b/src/gui/workspace/panel-manager.hpp
@@ -114,8 +114,9 @@ namespace workspace {
/**
* Shows a panel given a description index.
* @param description_index The index of the panel type to show.
+ * @return existing or new Panel, docked within the realm of this PanelManager.
*/
- void showPanel (const int description_index);
+ panel::Panel& showPanel (const int description_index);
/**
* Switches a panel from one type to another,
diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm
index b4da59e58..7699076f0 100644
--- a/wiki/thinkPad.ichthyo.mm
+++ b/wiki/thinkPad.ichthyo.mm
@@ -1467,8 +1467,8 @@
+ A dock item is a container widget that can be docked at different place. +
++ It accepts a single child and adds a grip allowing the user to click on it +
++ to drag and drop the widget. +
++ +
++ The grip is implemented as a GdlDockItemGrip +
+ + +