Project property dialog: The component help does not crash anymore when hitting the back button.

[DEVELOPMENT ENVIRONMENT]
* BUG: Project property dialog: The component help does not crash anymore when hitting the back button.
This commit is contained in:
gambas 2021-11-12 21:26:40 +01:00
parent cad8414c55
commit 375ce85217
2 changed files with 14 additions and 7 deletions

View file

@ -115,9 +115,14 @@ Private Sub Url_Write(Value As String)
End
Public Sub Back()
Public Sub Back() As Boolean
$hView.Back
If $hView Is WebView Then
If Not $hView.History.CanGoBack Then Return True
$hView.Back()
Else
Return $hView.Back()
Endif
End
@ -157,3 +162,8 @@ Public Sub ZoomNormal()
End
Public Sub Clear()
$hView.Clear()
End

View file

@ -169,11 +169,7 @@ End
Public Sub btnBack_Click()
If webAboutComponent.History.CanGoBack Then
webAboutComponent.Back
Else
'webAboutComponent.Stop
webAboutComponent.Clear
If webAboutComponent.Back() Then
wizComponent.MovePrevious
Endif
@ -476,6 +472,7 @@ Public Sub gvwComponent_Click()
Else If gvwComponent.Column = 4 And If Project.Documentation.Exist(sComp) Then
webAboutComponent.ReadConfig
webAboutComponent.Clear
MHelp.InitWebViewWith(webAboutComponent, MHelp.TYPE_COMPONENT, GetCurrent(),, "v&nh")
webAboutComponent.Zoom = Settings["/Help/Zoom", 80] / 100
wizComponent.MoveNext