summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2017-10-11 19:45:11 +0200
committerCaolán McNamara <caolanm@redhat.com>2017-10-16 22:14:36 +0200
commit91ec020991a0558ea4b927808f3b346254e52c3d (patch)
tree1e3558d55deb9c40720e28f54f7df752aa16420a
parente056ff15aa371dca9b887471846a537e13c4214c (diff)
tdf#113052 needs mpUIBuilder to load breaklistmenu
The mpUIBuilder object is also used in the else branch, so move the creation in the outer scope. Change-Id: I18211bbe3c6f85cdd7697225159a98ad672a4ce2 (cherry picked from commit 7f7ed0260ab7e08401f0129cde312cd8aa0fbddf) Reviewed-on: https://gerrit.libreoffice.org/43330 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--basctl/source/basicide/baside2b.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 3a9d1d4bc405..42fa77f9ce78 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1451,14 +1451,14 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt )
{
if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
{
+ if (!mpUIBuilder)
+ mpUIBuilder.reset(new VclBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/BasicIDE/ui/breakpointmenus.ui", ""));
+
Point aPos( rCEvt.IsMouseEvent() ? rCEvt.GetMousePosPixel() : Point(1,1) );
Point aEventPos( PixelToLogic( aPos ) );
BreakPoint* pBrk = rCEvt.IsMouseEvent() ? FindBreakPoint( aEventPos ) : nullptr;
if ( pBrk )
{
- if (!mpUIBuilder)
- mpUIBuilder.reset(new VclBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/BasicIDE/ui/breakpointmenus.ui", ""));
-
// test if break point is enabled...
VclPtr<PopupMenu> xBrkPropMenu = mpUIBuilder->get_menu("breakmenu");
xBrkPropMenu->CheckItem(xBrkPropMenu->GetItemId("active"), pBrk->bEnabled);