Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-05

attn mattias / notebook onchange / sourceeditor

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin

they are no longer triggered at all?

so we could skip the if, in sourceeditor and always call by hand?

Revision: 25639
Author: mattias
Date: 16:54:22, 25 May 2010
Message:
IDE: fixed updating statusbar, notebookpagechange events are no longer triggered when PageIndex changes by program
----
Modified : /trunk/examples/dockmanager/design/registereasydockmgr.pas Modified : /trunk/ide/sourceeditor.pp

Reply by email

Martin
to Mattias Gaertner
Mattias Gaertner wrote 8 lines
On Thu, 27 May 2010 14:11:45 +0100 Martin wrote: > they are no longer triggered at all? > Not even if user clicks on another tab?

What I meant:

we keep NotebookPagechenged.
But in the code below, we do not need the IF => because we have to make the call always?

procedure TSourceNotebook.SetPageIndex(const AValue: Integer);
begin
   FPageIndex := AValue;
   if FUpdateLock = 0 then begin
     FPageIndex := Max(0, Min(FPageIndex, FNotebook.PageCount-1));
     if Assigned(Manager) and (FNotebook.PageIndex = FPageIndex) then
       Manager.DoActiveEditorChanged;
     // make sure the statusbar is updated
     Include(States, snNotbookPageChangedNeeded);
     FNotebook.PageIndex := FPageIndex;
// the if below
     if snNotbookPageChangedNeeded in States then
       NotebookPageChanged(nil);
   end;
end;

Reply by email