diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-05-07 13:08:15 +0200 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-05-07 13:08:15 +0200 |
commit | bc53fa7c87db3c9390fcbeb43dfa6a65aa48f4bb (patch) | |
tree | 833362698764e7c0483ff2c62b884f28ff524c28 /sfx2 | |
parent | 028d3184a822a79d19d154b3cc6a5deaa4af023f (diff) |
slidecopy: when activating a tool panel which is already active, let it grab the focus
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/taskpane.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx index 3fa5875eec69..566c2181c056 100644 --- a/sfx2/source/dialog/taskpane.cxx +++ b/sfx2/source/dialog/taskpane.cxx @@ -970,7 +970,16 @@ namespace sfx2 { ::boost::optional< size_t > aPanelPos( m_rTaskPane.GetPanelPos( i_rPanelURL ) ); ENSURE_OR_RETURN_VOID( !!aPanelPos, "TaskPaneController_Impl::ActivateToolPanel: no such panel!" ); - m_rTaskPane.GetPanelDeck().ActivatePanel( aPanelPos ); + + if ( aPanelPos == m_rTaskPane.GetPanelDeck().GetActivePanel() ) + { + ::svt::PToolPanel pPanel( m_rTaskPane.GetPanelDeck().GetPanel( *aPanelPos ) ); + pPanel->GrabFocus(); + } + else + { + m_rTaskPane.GetPanelDeck().ActivatePanel( aPanelPos ); + } } // ----------------------------------------------------------------------------------------------------------------- |