mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 02:49:19 +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
|
uses
|
||||||
ContNrs, SysUtils, Classes, Variants,
|
ContNrs, SysUtils, Classes, Variants,
|
||||||
LazUtf8, Controls, StdCtrls, Grids, LResources, Dialogs, LCLType, Laz2_XMLCfg;
|
LazUtf8, Controls, StdCtrls, Grids, LResources, Dialogs, LCLType, Laz2_XMLCfg,
|
||||||
|
LCLStrConsts;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -1541,6 +1542,8 @@ begin
|
|||||||
//debugln('TValueListEditor.SetRowCount: AValue=',DbgS(AValue));
|
//debugln('TValueListEditor.SetRowCount: AValue=',DbgS(AValue));
|
||||||
OldValue := inherited RowCount;
|
OldValue := inherited RowCount;
|
||||||
if OldValue = AValue then Exit;
|
if OldValue = AValue then Exit;
|
||||||
|
if FixedRows > AValue then
|
||||||
|
Raise EGridException.Create(rsFixedRowsTooBig);
|
||||||
NewCount := AValue - FixedRows;
|
NewCount := AValue - FixedRows;
|
||||||
if (NewCount > Strings.Count) then
|
if (NewCount > Strings.Count) then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user