Fix some legacy set-to-idle statements.

This commit is contained in:
Jeff Young 2019-05-10 23:24:02 +01:00
parent 792c4328aa
commit 5e08be7018
2 changed files with 7 additions and 6 deletions

View File

@ -581,7 +581,7 @@ void LIB_EDIT_FRAME::OnSelectUnit( wxCommandEvent& event )
if( ( i == wxNOT_FOUND ) || ( ( i + 1 ) == m_unit ) )
return;
m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, GetGalCanvas()->GetDefaultCursor() );
m_toolManager->RunAction( ACTIONS::cancelInteractive, true );
m_toolManager->RunAction( EE_ACTIONS::clearSelection, true );
m_unit = i + 1;
@ -631,7 +631,7 @@ void LIB_EDIT_FRAME::OnViewEntryDoc( wxCommandEvent& event )
void LIB_EDIT_FRAME::OnSelectBodyStyle( wxCommandEvent& event )
{
m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, GetGalCanvas()->GetDefaultCursor() );
m_toolManager->RunAction( ACTIONS::cancelInteractive, true );
m_toolManager->RunAction( EE_ACTIONS::clearSelection, true );
m_convert = event.GetId() == ID_DE_MORGAN_NORMAL_BUTT ? 1 : 2;
@ -725,7 +725,7 @@ void LIB_EDIT_FRAME::OnEditComponentProperties( wxCommandEvent& event )
wxString oldName = GetCurPart()->GetName();
wxArrayString oldAliases = GetCurPart()->GetAliasNames( false );
m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, GetGalCanvas()->GetDefaultCursor() );
m_toolManager->RunAction( ACTIONS::cancelInteractive, true );
m_toolManager->RunAction( EE_ACTIONS::clearSelection, true );
DIALOG_EDIT_COMPONENT_IN_LIBRARY dlg( this, GetCurPart() );

View File

@ -33,6 +33,7 @@
#include <gestfich.h>
#include <eeschema_id.h>
#include <tool/ee_actions.h>
#include <general.h>
#include <lib_edit_frame.h>
#include <class_library.h>
@ -46,7 +47,7 @@
#include <sch_legacy_plugin.h>
#include <dialog_choose_component.h>
#include <symbol_tree_model_adapter.h>
#include <tool/tool_manager.h>
#include <dialogs/dialog_lib_new_component.h>
#include <dialog_helpers.h>
#include <wx/clipbrd.h>
@ -326,7 +327,7 @@ void LIB_EDIT_FRAME::OnSaveAll( wxCommandEvent& event )
void LIB_EDIT_FRAME::OnCreateNewPart( wxCommandEvent& event )
{
m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, GetGalCanvas()->GetDefaultCursor() );
m_toolManager->RunAction( ACTIONS::cancelInteractive, true );
wxString lib = getTargetLib();
if( !m_libMgr->LibraryExists( lib ) )
@ -791,7 +792,7 @@ bool LIB_EDIT_FRAME::saveLibrary( const wxString& aLibrary, bool aNewFile )
wxString msg;
PROJECT& prj = Prj();
m_canvas->EndMouseCapture( ID_NO_TOOL_SELECTED, GetGalCanvas()->GetDefaultCursor() );
m_toolManager->RunAction( ACTIONS::cancelInteractive, true );
if( !aNewFile && ( aLibrary.empty() || !prj.SchSymbolLibTable()->HasLibrary( aLibrary ) ) )
{