Automatic completion: Fix automatic completion overlap prevention routine.

[DEVELOPMENT ENVIRONMENT]
* BUG: Automatic completion: Fix automatic completion overlap prevention routine.
This commit is contained in:
gambas 2021-03-02 18:15:04 +01:00 committed by Christof Thalhofer
parent 6e8828d0c4
commit e8531901da
3 changed files with 8 additions and 6 deletions

View file

@ -108,11 +108,11 @@ Public Sub Position(hEditor As TextEditor)
hCont = hCont.Parent
Loop
FixPosition($hEditor, ByRef iX, ByRef iY)
FCompletion.FixPosition($hEditor, ByRef iX, ByRef iY)
Dec Application.Busy
If Me.Parent = $hForm And If iX = Me.X And iY = Me.Y And Me.Visible Then Return
If Me.Parent = $hForm And If iX = Me.X And If iY = Me.Y And If Me.Visible Then Return
Me.Reparent($hForm, iX, iY)
If Not Me.Visible Then
@ -144,7 +144,9 @@ Static Public Sub FixPosition(hEditor As TextEditor, Optional ByRef X As Integer
'Debug Y;; "/";; FSignature.Y;; FSignature.H
If X >= FSignature.X And If X + Me.W <= FSignature.X + FSignature.W Then
'FIXME: Had a crash with Me.W inside that static function
If X < FSignature.X + FSignature.W And If X + FCompletion.W > FSignature.X Then
If Y = FSignature.Y Then
Y += FSignature.H - 1

View file

@ -6,7 +6,6 @@
Ignore = True
Persistent = True
Border = False
SkipTaskbar = True
Arrangement = Arrange.Fill
{ panComp Panel
MoveScaled(1,1,67,15)

View file

@ -85,14 +85,14 @@ Private Sub UpdateSignature(Optional hForm As FEditor)
If Not hForm Then
Me.Move(iX, iY)
Else
If Me.Parent <> hForm Or If iX <> Me.X Or If iY <> Me.Y Or If Me.Visible Then
If Me.Parent <> hForm Or If iX <> Me.X Or If iY <> Me.Y Or If Not Me.Visible Then
Me.Reparent(hForm, iX, iY)
Me.Show
Me.Raise
$hEditor.SetFocus
Endif
Endif
Me.Raise
FCompletion.FixPosition($hEditor)
End
@ -229,6 +229,7 @@ Public Sub HideFrom(hEditor As TextEditor)
If $hEditor <> hEditor Then Return
$hEditor = Null
Me.Hide
If FCompletion.VisibleFrom(hEditor) Then FCompletion.Position(hEditor)
End