diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-11-26 14:08:46 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-11-26 14:08:46 +0000 |
commit | ca92261ccdd75e01cd6b7f76372f1112ef2d9c26 (patch) | |
tree | 09b6fc1a9bdefaa4f2bc12d484a66ec6577b5b47 /sd | |
parent | 192adefe127f717c14e1eeb0b1874fa9bbecdacb (diff) |
INTEGRATION: CWS impress19 (1.2.128); FILE MERGED
2004/11/12 09:33:36 af 1.2.128.1: #i32743# Fixed focus travelling inside the ToolPanel.
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/toolpanel/ToolPanel.cxx | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/sd/source/ui/toolpanel/ToolPanel.cxx b/sd/source/ui/toolpanel/ToolPanel.cxx index 1a9898e5a935..5be04d758f3f 100644 --- a/sd/source/ui/toolpanel/ToolPanel.cxx +++ b/sd/source/ui/toolpanel/ToolPanel.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ToolPanel.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: rt $ $Date: 2004-07-13 14:40:40 $ + * last change: $Author: hr $ $Date: 2004-11-26 15:08:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -115,16 +115,20 @@ void ToolPanel::AddControl ( rTitle, TitleBar::TBT_CONTROL_TITLE)); - // Add a down link only for the first control so that when - // entering the sub tool panel the focus is set to the first control. - if (mpControlContainer->GetControlCount() == 1) - FocusManager::Instance().RegisterLink ( - GetParent(), - pChild->GetWindow()); - else - FocusManager::Instance().RegisterUpLink ( - pChild->GetWindow(), - GetParent()); + // Get the (grand) parent window which is focus-wise our parent. + Window* pParent = GetParent(); + if (pParent != NULL) + pParent = pParent->GetParent(); + + if (pParent != NULL) + { + // Add a down link only for the first control so that when entering + // the sub tool panel the focus is set to the first control. + if (mpControlContainer->GetControlCount() == 1) + FocusManager::Instance().RegisterLink (pParent, pChild->GetWindow()); + else + FocusManager::Instance().RegisterUpLink (pChild->GetWindow(), pParent); + } mpControlContainer->AddControl (pChild); } |