Skip to content

Commit

Permalink
add anchor to help URL only if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Feb 14, 2017
1 parent 23c09fc commit eaa97f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gui/qgshelp.cpp
Expand Up @@ -87,7 +87,11 @@ QUrl QgsHelp::helpUrl( const QString& key )
continue;
}
helpUrl = QUrl::fromLocalFile( filePath );
helpUrl.setFragment( helpPath.mid( helpPath.lastIndexOf( "#" ) + 1, -1 ) );
int pos = helpPath.lastIndexOf( "#" );
if ( pos != -1 )
{
helpUrl.setFragment( helpPath.mid( helpPath.lastIndexOf( "#" ) + 1, -1 ) );
}
}

helpFound = true;
Expand Down

0 comments on commit eaa97f3

Please sign in to comment.