mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 10:18:05 +02:00
Merged revision(s) 64605 #ac3fae6d99 from trunk:
TValueListEditor: raise an exception when setting RowCount < FixedRows. ........ git-svn-id: branches/fixes_2_0@64620 -
This commit is contained in:
parent
65acd97bcd
commit
77ecaa0856
@ -6,7 +6,8 @@ interface
|
||||
|
||||
uses
|
||||
ContNrs, SysUtils, Classes, Variants,
|
||||
LazUtf8, Controls, StdCtrls, Grids, LResources, Dialogs, LCLType;
|
||||
LazUtf8, Controls, StdCtrls, Grids, LResources, Dialogs, LCLType,
|
||||
LCLStrConsts;
|
||||
|
||||
type
|
||||
|
||||
@ -1350,6 +1351,8 @@ begin
|
||||
//debugln('TValueListEditor.SetRowCount: AValue=',DbgS(AValue));
|
||||
OldValue := inherited RowCount;
|
||||
if OldValue = AValue then Exit;
|
||||
if FixedRows > AValue then
|
||||
Raise EGridException.Create(rsFixedRowsTooBig);
|
||||
NewCount := AValue - FixedRows;
|
||||
if (NewCount > Strings.Count) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user