Commit dd1fcd05 authored by Maciej Suminski's avatar Maciej Suminski
Browse files

Fix for context menu hanging up in GAL.

parent b688f9bc
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -493,7 +493,7 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent )
            // If nothing was chosen from the context menu, we must notify the tool as well
            // If nothing was chosen from the context menu, we must notify the tool as well
            if( menu->GetSelected() < 0 )
            if( menu->GetSelected() < 0 )
            {
            {
                TOOL_EVENT evt( TC_COMMAND, TA_CONTEXT_MENU_CHOICE );
                TOOL_EVENT evt( TC_COMMAND, TA_CONTEXT_MENU_CHOICE, -1 );
                dispatchInternal( evt );
                dispatchInternal( evt );
            }
            }


@@ -518,10 +518,6 @@ void TOOL_MANAGER::ScheduleContextMenu( TOOL_BASE* aTool, CONTEXT_MENU* aMenu,


    st->contextMenu = aMenu;
    st->contextMenu = aMenu;
    st->contextMenuTrigger = aTrigger;
    st->contextMenuTrigger = aTrigger;

    // the tool wants the menu immediately? Preempt it and do so :)
    if( aTrigger == CMENU_NOW )
        st->cofunc->Yield();
}
}




+1 −3
Original line number Original line Diff line number Diff line
@@ -451,12 +451,10 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector )
        {
        {
            brightBox.reset( new BRIGHT_BOX( current ) );
            brightBox.reset( new BRIGHT_BOX( current ) );
            getView()->Add( brightBox.get() );
            getView()->Add( brightBox.get() );
            // BRIGHT_BOX is removed from view on destruction
        }
        }
    }
    }


    // Removes possible brighten mark
    getView()->MarkTargetDirty( KIGFX::TARGET_OVERLAY );

    return current;
    return current;
}
}


+1 −1

File changed.

Contains only whitespace changes.