summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2017-10-11 19:45:11 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2017-10-11 19:54:18 +0200
commit7f7ed0260ab7e08401f0129cde312cd8aa0fbddf (patch)
treeb4be56216708e1be67112fd2e2b47c8f2004e30e /basctl
parentf0910cb9d64e4ad4d152f304e94580cf54407edd (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
Diffstat (limited to 'basctl')
-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 a7f39fd0b799..877b8a9e26ef 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);