@@ -1635,20 +1635,14 @@ def __Dispatch10(self, groupcount):
16351635 self .vsl , c , self .__g_arg , self .__q_arg )
16361636 self .error = 'Log reacquired'
16371637
1638- self ._wrkcb = False
16391638 i = self .lva .VSLQ_Dispatch (
16401639 self .vslq , VSLQ_dispatch_f (self ._callBack ), None )
16411640
1642- if i == 1 :
1643- if self ._groupcb and self ._wrkcb :
1644- self ._wrkcb = False
1645- self ._groupcb (self , self ._priv )
1646- if groupcount != 1 :
1647- if groupcount > 1 :
1648- groupcount -= 1
1649- continue
1650-
1651- if i > - 2 :
1641+ if i == 1 and groupcount != 1 :
1642+ if groupcount > 1 :
1643+ groupcount -= 1
1644+ continue
1645+ elif i > - 2 :
16521646 return i
16531647 if not self .vsm :
16541648 return i
@@ -1684,20 +1678,14 @@ def __Dispatch20(self, groupcount):
16841678 self .hascursor = 1
16851679 self .lva .VSLQ_SetCursor (self .vslq , byref (cast (c , c_void_p )))
16861680
1687- self ._wrkcb = False
16881681 i = self .lva .VSLQ_Dispatch (
16891682 self .vslq , VSLQ_dispatch_f (self ._callBack ), None )
16901683
1691- if i == 1 :
1692- if self ._groupcb and self ._wrkcb :
1693- self ._wrkcb = False
1694- self ._groupcb (self , self ._priv )
1695- if groupcount != 1 :
1696- if groupcount > 1 :
1697- groupcount -= 1
1698- continue
1699-
1700- if i > - 2 :
1684+ if i == 1 and groupcount != 1 :
1685+ if groupcount > 1 :
1686+ groupcount -= 1
1687+ continue
1688+ elif i > - 2 :
17011689 return i
17021690 if not self .vsm :
17031691 return i
@@ -1736,7 +1724,6 @@ def __VSLQ_Name2Grouping(self, arg):
17361724 return self .lva .VSLQ_Name2Grouping (arg , - 1 )
17371725
17381726 def _callBack (self , vsl , pt , fo ):
1739- self ._wrkcb = True
17401727 idx = - 1
17411728 while 1 :
17421729 idx += 1
@@ -1776,4 +1763,7 @@ def _callBack(self, vsl, pt, fo):
17761763
17771764 if self ._cb :
17781765 self ._cb (self , cbd , self ._priv )
1766+ if self ._groupcb :
1767+ self ._groupcb (self , self ._priv )
1768+
17791769 return (0 )
0 commit comments