Qt: bugfix for tab moving.fixes #15575

git-svn-id: trunk@23546 -
This commit is contained in:
zeljko 2010-01-24 16:35:03 +00:00
parent 3b40a09076
commit bd405b7edf
2 changed files with 11 additions and 2 deletions

View File

@ -6094,7 +6094,6 @@ end;
procedure TQtTabWidget.setCurrentWidget(APage: TQtWidget);
begin
QTabWidget_setCurrentWidget(QTabWidgetH(Widget), APage.Widget);
APage.setFocus;
end;
{------------------------------------------------------------------------------
@ -6120,7 +6119,10 @@ var
begin
if LCLObject = nil then
Exit;
if InUpdate then
exit;
FillChar(Msg, SizeOf(Msg), 0);
Msg.Msg := LM_NOTIFY;
FillChar(Hdr, SizeOf(Hdr), 0);

View File

@ -329,10 +329,17 @@ begin
Page := TQtPage(AChild.Handle);
TabWidget := TQtTabWidget(ANotebook.Handle);
AIndex := ANoteBook.IndexOf(AChild);
TabWidget.BeginUpdate;
TabWidget.setUpdatesEnabled(false);
TabWidget.removeTab(AIndex);
TabWidget.insertTab(NewIndex, Page.Widget, Page.getIcon, Page.getText);
TabWidget.setUpdatesEnabled(true);
TabWidget.EndUpdate;
if TabWidget.getCurrentIndex <> NewIndex then
TabWidget.setCurrentWidget(Page);
end;
class procedure TQtWSCustomNotebook.RemovePage(const ANotebook: TCustomNotebook;