From 9114709039a811dbb1c4e5426c725337630df811 Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Sun, 17 Nov 2019 01:51:54 +0000 Subject: [PATCH] project manager: Clear rename flag in the rename event handling --- kicad/tree_project_frame.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kicad/tree_project_frame.cpp b/kicad/tree_project_frame.cpp index 3796b8ccde..5a01659f57 100644 --- a/kicad/tree_project_frame.cpp +++ b/kicad/tree_project_frame.cpp @@ -879,6 +879,8 @@ void TREE_PROJECT_FRAME::OnFileSystemEvent( wxFileSystemWatcherEvent& event ) wxTreeItemId newitem = AddItemToTreeProject( pathModified.GetFullPath(), root_id, false ); // If we are in the process of renaming a file, select the new one + // This is needed for MSW and OSX, since we don't get RENAME events from them, just a + // pair of DELETE and CREATE events. if( m_isRenaming && newitem.IsOk() ) { m_TreeProject->SelectItem( newitem ); @@ -926,6 +928,8 @@ void TREE_PROJECT_FRAME::OnFileSystemEvent( wxFileSystemWatcherEvent& event ) // If the item exists, select it if( newitem.IsOk() ) m_TreeProject->SelectItem( newitem ); + + m_isRenaming = false; } break; }