[GB.FORM]
* BUG: TabPanel: Take object locking recursitivity into account. git-svn-id: svn://localhost/gambas/trunk@7046 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
f98653e2ab
commit
2e103b2b28
3 changed files with 9 additions and 8 deletions
|
@ -150,8 +150,6 @@ Public Sub Timer_Timer()
|
|||
|
||||
Dim aList As String[]
|
||||
Dim hCtrl As TextBox
|
||||
Dim H, Y As Integer
|
||||
Dim X As Integer
|
||||
Dim hPanel As Panel
|
||||
|
||||
$hTimer.Stop
|
||||
|
|
|
@ -355,13 +355,15 @@ Private Sub Count_Write(iCount As Integer)
|
|||
Dim hTab As _TabPanelContainer
|
||||
Dim hButton As _TabPanelButton
|
||||
Dim iCurrent As Integer
|
||||
Dim bLocked As Boolean
|
||||
|
||||
If iCount < 1 Then Error.Raise("Bad argument")
|
||||
If iCount = $aCont.Count Then Return
|
||||
|
||||
iCurrent = $iCurrent
|
||||
|
||||
Object.Lock(Me)
|
||||
|
||||
bLocked = Object.IsLocked(Me)
|
||||
If Not bLocked Then Object.Lock(Me)
|
||||
|
||||
If iCount < $aCont.Count Then
|
||||
|
||||
|
@ -397,7 +399,7 @@ Private Sub Count_Write(iCount As Integer)
|
|||
$iCurrent = -1
|
||||
If iCurrent < 0 Then iCurrent = $aCont.Max
|
||||
|
||||
Object.Unlock(Me)
|
||||
If Not bLocked Then Object.Unlock(Me)
|
||||
|
||||
Try Index_Write(iCurrent)
|
||||
|
||||
|
@ -831,10 +833,12 @@ Public Sub _MoveTab(hSrc As _TabPanelButton, hDst As _TabPanelButton, bAfter As
|
|||
|
||||
Dim S, T As Integer
|
||||
Dim hSrcPanel As Control
|
||||
Dim bLocked As Boolean
|
||||
|
||||
If hSrc = hDst Then Return
|
||||
|
||||
Object.Lock(Me)
|
||||
bLocked = Object.IsLocked(Me)
|
||||
If Not bLocked Then Object.Lock(Me)
|
||||
|
||||
S = _GetIndex(hSrc)
|
||||
$aButton.Remove(S)
|
||||
|
@ -848,7 +852,7 @@ Public Sub _MoveTab(hSrc As _TabPanelButton, hDst As _TabPanelButton, bAfter As
|
|||
|
||||
UpdateLayout
|
||||
|
||||
Object.Unlock(Me)
|
||||
If Not bLocked Then Object.Unlock(Me)
|
||||
|
||||
Raise Move(S, T)
|
||||
|
||||
|
|
|
@ -171,7 +171,6 @@ Public Sub NumberBox_Change()
|
|||
Dim iPos As Integer = $hTextBox.Pos
|
||||
Dim sText As String = $hTextBox.Text
|
||||
Dim bNeg As Boolean
|
||||
Dim bRaiseChange As Boolean
|
||||
|
||||
If Left(sText) = "-" Then
|
||||
bNeg = True
|
||||
|
|
Loading…
Reference in a new issue