TextEditor: Do not use Application.Busy in Load() and Save() methods and fix TextEditor[].Purge() method.

[GB.FORM.EDITOR]
* NEW: TextEditor: Do not use Application.Busy in Load() and Save() methods.
* BUG: TextEditor: TextEditor[].Purge() works as expected now.
This commit is contained in:
gambas 2020-04-21 07:32:52 +02:00
parent fae4d5df83
commit a53acf81c7
2 changed files with 14 additions and 13 deletions

View file

@ -396,32 +396,32 @@ End
Public Sub Load(Path As String, Optional AddNewLine As Boolean)
Inc Application.Busy
'Inc Application.Busy
Goto(0, 0)
$hDoc.Load(Path, AddNewLine)
Init
If $bShowPreview Then $hTimerSideBarRefresh.Trigger
Dec Application.Busy
'Dec Application.Busy
Catch
Dec Application.Busy
Error.Propagate
' Catch
'
' Dec Application.Busy
' Error.Propagate
End
Public Sub Save(Path As String)
Inc Application.Busy
'Inc Application.Busy
$hDoc.HighlightFrom($Y)
$hDoc.Save(Path)
$hTimerChange = Null
Dec Application.Busy
'Dec Application.Busy
Catch
Dec Application.Busy
Error.Propagate
' Catch
'
' 'Dec Application.Busy
' Error.Propagate
End

View file

@ -133,7 +133,8 @@ Public Sub Purge(Optional KeepComment As Boolean, KeepString As Boolean, Replace
If iState = Highlight.Comment Or If iState = Highlight.Help Then
bReplace = True
Endif
Else If Not KeepString And If iState = Highlight.String Then
Endif
If Not KeepString And If iState = Highlight.String Then
bReplace = True
Endif
If bReplace Then