mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 18:29:12 +02:00
TValueListEditor: raise an exception when setting RowCount < FixedRows.
git-svn-id: trunk@64605 -
This commit is contained in:
parent
9baf8fe81d
commit
ac3fae6d99
@ -6,7 +6,8 @@ interface
|
||||
|
||||
uses
|
||||
ContNrs, SysUtils, Classes, Variants,
|
||||
LazUtf8, Controls, StdCtrls, Grids, LResources, Dialogs, LCLType, Laz2_XMLCfg;
|
||||
LazUtf8, Controls, StdCtrls, Grids, LResources, Dialogs, LCLType, Laz2_XMLCfg,
|
||||
LCLStrConsts;
|
||||
|
||||
type
|
||||
|
||||
@ -1541,6 +1542,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