7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 00:21:25 +00:00

Fix opening zip archives from project manager tree on Win11.

Also removes unused OpenFile function.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19399
This commit is contained in:
Alex Shvartzkop 2024-12-30 20:51:19 +05:00
parent ca68ac0076
commit b2acddc483
3 changed files with 1 additions and 21 deletions

View File

@ -287,25 +287,6 @@ bool OpenPDF( const wxString& file )
}
void OpenFile( const wxString& file )
{
wxFileName fileName( file );
wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension( fileName.GetExt() );
if( !filetype )
return;
wxString command;
wxFileType::MessageParameters params( file );
filetype->GetOpenCommand( &command, params );
delete filetype;
if( !command.IsEmpty() )
wxExecute( command );
}
void KiCopyFile( const wxString& aSrcPath, const wxString& aDestPath, wxString& aErrors )
{
if( !wxCopyFile( aSrcPath, aDestPath ) )

View File

@ -48,7 +48,6 @@ class EDA_LIST_DIALOG;
* @return true is success or false if no PDF viewer found.
*/
KICOMMON_API bool OpenPDF( const wxString& file );
KICOMMON_API void OpenFile( const wxString& file );
/**
* @param aSrcPath is the full filename of the source.

View File

@ -263,7 +263,7 @@ void PROJECT_TREE_ITEM::Activate( PROJECT_TREE_PANE* aTreePrjFrame )
break;
default:
OpenFile( fullFileName );
wxLaunchDefaultApplication( fullFileName );
break;
}
}