[Libreoffice-commits] core.git: basctl/source

Jan-Marek Glogowski glogow at fbihome.de
Wed Oct 11 17:55:20 UTC 2017


 basctl/source/basicide/baside2b.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 7f7ed0260ab7e08401f0129cde312cd8aa0fbddf
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Wed Oct 11 19:45:11 2017 +0200

    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

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);


More information about the Libreoffice-commits mailing list