mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
Avoid desktop flickering on WinXP at the cost of minor flickering on the main tabs. Seems LockWindowUpdate() should be used with caution. Fixes issue #1659.
This commit is contained in:
@ -8587,13 +8587,10 @@ begin
|
|||||||
NewPageIndex := PageControlMain.ActivePageIndex;
|
NewPageIndex := PageControlMain.ActivePageIndex;
|
||||||
if NewPageIndex >= PageIndex then
|
if NewPageIndex >= PageIndex then
|
||||||
Dec(NewPageIndex);
|
Dec(NewPageIndex);
|
||||||
// Avoid excessive flicker:
|
|
||||||
LockWindowUpdate(PageControlMain.Handle);
|
|
||||||
PageControlMain.Pages[PageIndex].Free;
|
PageControlMain.Pages[PageIndex].Free;
|
||||||
QueryTabs.Delete(PageIndex-tabQuery.PageIndex);
|
QueryTabs.Delete(PageIndex-tabQuery.PageIndex);
|
||||||
PageControlMain.ActivePageIndex := NewPageIndex;
|
PageControlMain.ActivePageIndex := NewPageIndex;
|
||||||
FixQueryTabCloseButtons;
|
FixQueryTabCloseButtons;
|
||||||
LockWindowUpdate(0);
|
|
||||||
PageControlMain.OnChange(PageControlMain);
|
PageControlMain.OnChange(PageControlMain);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -8662,7 +8659,6 @@ begin
|
|||||||
// Avoid AV on Startup, when Mainform.OnResize is called once or twice implicitely.
|
// Avoid AV on Startup, when Mainform.OnResize is called once or twice implicitely.
|
||||||
if not Assigned(btnAddTab) then
|
if not Assigned(btnAddTab) then
|
||||||
Exit;
|
Exit;
|
||||||
LockWindowUpdate(PageControlMain.Handle);
|
|
||||||
for PageIndex:=tabQuery.PageIndex+1 to PageControlMain.PageCount-1 do begin
|
for PageIndex:=tabQuery.PageIndex+1 to PageControlMain.PageCount-1 do begin
|
||||||
VisiblePageIndex := PageIndex;
|
VisiblePageIndex := PageIndex;
|
||||||
for i:=0 to PageControlMain.PageCount-1 do begin
|
for i:=0 to PageControlMain.PageCount-1 do begin
|
||||||
@ -8683,8 +8679,6 @@ begin
|
|||||||
Rect := PageControlMain.TabRect(VisiblePageIndex);
|
Rect := PageControlMain.TabRect(VisiblePageIndex);
|
||||||
btnAddTab.Top := Rect.Top;
|
btnAddTab.Top := Rect.Top;
|
||||||
btnAddTab.Left := Rect.Right + 5;
|
btnAddTab.Left := Rect.Right + 5;
|
||||||
|
|
||||||
LockWindowUpdate(0);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user