summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/dock-item.cpp
diff options
context:
space:
mode:
authorgustav_b <gustav_b@users.sourceforge.net>2007-09-20 08:17:58 +0000
committergustav_b <gustav_b@users.sourceforge.net>2007-09-20 08:17:58 +0000
commit2253fd51aece1dd179464456822ee8897f9661f8 (patch)
treea1d609e950d363a17f1f7181e72635bb90f507d8 /src/ui/widget/dock-item.cpp
parentfix typo in 2geom Makefile_insert (diff)
downloadinkscape-2253fd51aece1dd179464456822ee8897f9661f8.tar.gz
inkscape-2253fd51aece1dd179464456822ee8897f9661f8.zip
Add scrolling of dock on DockItem::present.
(bzr r3777)
Diffstat (limited to 'src/ui/widget/dock-item.cpp')
-rw-r--r--src/ui/widget/dock-item.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ui/widget/dock-item.cpp b/src/ui/widget/dock-item.cpp
index 372fe5d9d..2187c33e9 100644
--- a/src/ui/widget/dock-item.cpp
+++ b/src/ui/widget/dock-item.cpp
@@ -269,7 +269,7 @@ DockItem::show_all()
void
DockItem::present()
{
- // iconified or unattached
+
if (isIconified() || !isAttached()) {
show();
}
@@ -280,11 +280,13 @@ DockItem::present()
GTK_WIDGET (_gdl_dock_item));
if (i >= 0)
gtk_notebook_set_current_page (GTK_NOTEBOOK (_gdl_dock_item->parent), i);
- return;
- }
+ }
// always grab focus, even if we're already present
grab_focus();
+
+ if (!isFloating() && getWidget().is_realized())
+ _dock.scrollToItem(*this);
}