Kaydet (Commit) cb01fc2e authored tarafından Ariel Constenla-Haile's avatar Ariel Constenla-Haile Kaydeden (comit) Caolán McNamara

Related: #i108689# Invalidate Basic IDE slots to trigger feature update

(cherry picked from commit 060758a2)

Conflicts:
	basctl/source/basicide/baside2b.cxx
	basctl/source/basicide/baside3.cxx

Change-Id: I2bbe4eeae9b2e4d3ad257b26a6a9694deeaaa87c
üst 0d61e5dc
......@@ -424,7 +424,11 @@ void EditorWindow::MouseButtonUp( const MouseEvent &rEvt )
{
pEditView->MouseButtonUp( rEvt );
if (SfxBindings* pBindings = GetBindingsPtr())
{
pBindings->Invalidate( SID_COPY );
pBindings->Invalidate( SID_CUT );
pBindings->Invalidate( SID_BASICIDE_STAT_POS );
}
}
}
......@@ -511,15 +515,20 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt )
{
if (SfxBindings* pBindings = GetBindingsPtr())
{
pBindings->Invalidate( SID_CUT );
pBindings->Invalidate( SID_COPY );
pBindings->Invalidate( SID_BASICIDE_STAT_POS );
if ( rKEvt.GetKeyCode().GetGroup() == KEYGROUP_CURSOR )
pBindings->Update( SID_BASICIDE_STAT_POS );
if ( !bWasModified && pEditEngine->IsModified() )
{
pBindings->Invalidate( SID_SAVEDOC );
pBindings->Invalidate( SID_DOC_MODIFIED );
pBindings->Invalidate( SID_UNDO );
}
if ( rKEvt.GetKeyCode().GetCode() == KEY_INSERT )
pBindings->Invalidate( SID_ATTR_INSERT );
}
......
......@@ -156,6 +156,8 @@ void DialogWindow::MouseButtonUp( const MouseEvent& rMEvt )
pBindings->Invalidate( SID_SHOW_PROPERTYBROWSER );
pBindings->Invalidate( SID_DOC_MODIFIED );
pBindings->Invalidate( SID_SAVEDOC );
pBindings->Invalidate( SID_COPY );
pBindings->Invalidate( SID_CUT );
}
}
......@@ -170,6 +172,8 @@ void DialogWindow::MouseMove( const MouseEvent& rMEvt )
void DialogWindow::KeyInput( const KeyEvent& rKEvt )
{
SfxBindings* pBindings = GetBindingsPtr();
if( rKEvt.GetKeyCode() == KEY_BACKSPACE )
{
if (SfxDispatcher* pDispatcher = GetDispatcher())
......@@ -177,9 +181,8 @@ void DialogWindow::KeyInput( const KeyEvent& rKEvt )
}
else
{
if (rKEvt.GetKeyCode() == KEY_TAB)
if (SfxBindings* pBindings = GetBindingsPtr())
pBindings->Invalidate( SID_SHOW_PROPERTYBROWSER );
if( pBindings && rKEvt.GetKeyCode() == KEY_TAB )
pBindings->Invalidate( SID_SHOW_PROPERTYBROWSER );
if( !pEditor->KeyInput( rKEvt ) )
{
......@@ -187,6 +190,13 @@ void DialogWindow::KeyInput( const KeyEvent& rKEvt )
Window::KeyInput( rKEvt );
}
}
// may be KEY_TAB, KEY_BACKSPACE, KEY_ESCAPE
if( pBindings )
{
pBindings->Invalidate( SID_COPY );
pBindings->Invalidate( SID_CUT );
}
}
void DialogWindow::Command( const CommandEvent& rCEvt )
......
......@@ -863,6 +863,9 @@ void Shell::InvalidateBasicIDESlots()
{
if (SfxBindings* pBindings = GetBindingsPtr())
{
pBindings->Invalidate( SID_COPY );
pBindings->Invalidate( SID_CUT );
pBindings->Invalidate( SID_PASTE );
pBindings->Invalidate( SID_UNDO );
pBindings->Invalidate( SID_REDO );
pBindings->Invalidate( SID_SAVEDOC );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment