IDE: In BuildMode config dialog, prevent hiding Name in the grid when InSession is not shown. Issue #27881.

git-svn-id: trunk@48796 -
This commit is contained in:
juha 2015-04-21 17:29:48 +00:00
parent 50b7181f88
commit 9e447df484

View File

@ -52,8 +52,8 @@ type
ButtonPanel1: TButtonPanel;
NoteLabel: TLabel;
procedure btnCreateDefaultModesClick(Sender: TObject);
procedure BuildModesStringGridDrawCell(Sender: TObject; aCol,
aRow: Integer; aRect: TRect; {%H-}aState: TGridDrawState);
procedure BuildModesStringGridDrawCell(Sender: TObject;
aCol, aRow: Integer; aRect: TRect; {%H-}aState: TGridDrawState);
procedure CancelButtonClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
@ -605,10 +605,12 @@ begin
;
end;
procedure TBuildModesForm.BuildModesStringGridDrawCell(Sender: TObject; aCol,
aRow: Integer; aRect: TRect; aState: TGridDrawState);
procedure TBuildModesForm.BuildModesStringGridDrawCell(Sender: TObject;
aCol, aRow: Integer; aRect: TRect; aState: TGridDrawState);
begin
if (aCol=1) and (aRow=1) then
Assert(aCol <> -1, 'TBuildModesForm.BuildModesStringGridDrawCell: aCol = -1');
// Hide InSession field of the first BuildMode by drawing an empty rect on it.
if (aCol=fModeInSessionCol) and (aRow=1) then
(Sender as TStringGrid).Canvas.FillRect(aRect);
end;