diff --git a/ide/frames/compiler_modematrix.pas b/ide/frames/compiler_modematrix.pas index d82e921095..8e1f4d82da 100644 --- a/ide/frames/compiler_modematrix.pas +++ b/ide/frames/compiler_modematrix.pas @@ -24,7 +24,6 @@ Options frame for build mode matrix options. ToDo: - - bug: change type in last row does not work - undo: combine changes while editing a cell } unit Compiler_ModeMatrix; diff --git a/ide/frames/modematrixctrl.pas b/ide/frames/modematrixctrl.pas index 628df3c374..cac3b99b27 100644 --- a/ide/frames/modematrixctrl.pas +++ b/ide/frames/modematrixctrl.pas @@ -1044,7 +1044,7 @@ var NewType: String; begin Item:=Sender as TMenuItem; - if fTypePopupMenuRow>=Matrix.RowCount then exit; + if (fTypePopupMenuRow<=0) or (fTypePopupMenuRow>Matrix.RowCount) then exit; if Matrix.Rows[fTypePopupMenuRow-1] is TGroupedMatrixValue then begin ValueRow:=TGroupedMatrixValue(Matrix[fTypePopupMenuRow-1]); NewType:=TypeColumn.PickList.Names[Item.MenuIndex]; diff --git a/lcl/include/menuitem.inc b/lcl/include/menuitem.inc index d5a85ac62e..cabab89043 100644 --- a/lcl/include/menuitem.inc +++ b/lcl/include/menuitem.inc @@ -272,7 +272,7 @@ end; ------------------------------------------------------------------------------} procedure TMenuItem.DoClicked(var msg); begin -// CheckChildrenHandles; <- This is already called when menuitem is created. + // CheckChildrenHandles; <- This is already called when menuitem is created. if not (csDesigning in ComponentState) then begin InitiateActions;