Add file:// to list of things recognized as URL.
Fixes: lp:1785879 * https://bugs.launchpad.net/kicad/+bug/1785879
This commit is contained in:
parent
5f31ce03f7
commit
8884298f29
|
@ -176,7 +176,7 @@ bool FIELDS_GRID_TABLE<T>::CanSetValueAs( int aRow, int aCol, const wxString& aT
|
|||
template <class T>
|
||||
wxGridCellAttr* FIELDS_GRID_TABLE<T>::GetAttr( int aRow, int aCol, wxGridCellAttr::wxAttrKind )
|
||||
{
|
||||
static wxRegEx httpPrefix( wxT( "https?:\/\/" ) );
|
||||
static wxRegEx urlPrefix( wxT( "((https?)|(file)):\/\/" ) );
|
||||
|
||||
switch( aCol )
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ wxGridCellAttr* FIELDS_GRID_TABLE<T>::GetAttr( int aRow, int aCol, wxGridCellAtt
|
|||
m_urlAttr->IncRef();
|
||||
return m_urlAttr;
|
||||
}
|
||||
else if( httpPrefix.Matches( GetValue( aRow, aCol ) ) )
|
||||
else if( urlPrefix.Matches( GetValue( aRow, aCol ) ) )
|
||||
{
|
||||
// Treat any user-defined field that starts with http:// or https:// as a URL
|
||||
m_urlAttr->IncRef();
|
||||
|
|
Loading…
Reference in New Issue