[Gambas-user] Small suggestion re Help Browser "same URL" click

Benoît Minisini gambas at ...1...
Thu Sep 15 12:15:17 CEST 2011


> Benoit,
> 
> This mod needs confirmation as I am unsure as to why the original line was
> commented out.
> 
> It just doesn't update hWebView.Url if the calculated target Url is the
> same as what's already being displayed.
> I have had it running here for ~10 days or so and have not seen any side
> effect.
> 
> regards
> Bruce
> 
> 
> Index: MHelp.module
> ===================================================================
> --- MHelp.module    (revision 4126)
> +++ MHelp.module    (working copy)
> @@ -415,10 +415,13 @@
> 
>      If sMore Then sUrl &= "&" & sMore
>      sMore &= "&" & GetLanguage() ' ??
> -    'If hWebView.Url = sUrl Then Return
> -
> -    hWebView.Url = sUrl
> 
> +    ' bb: tries to avoid reloading the same page by
> +    ' not inciting the hWebView_Load(?) event
> +    If hWebView.Url <> sUrl Then
> +      hWebView.Url = sUrl
> +    Endif
> +
>    Else
>      hWebView.HTML = "<html><body><h2>" & ("No help found.") &
> "</h2></body></html>"
>    Endif

Mmm... Yes, I don't know why I commented that line. There is a reason for 
sure, but I don't remember it! :-)

I will uncomment it to see what happens.

-- 
Benoît Minisini




More information about the User mailing list