From 9e447df484b51b8c1af8fe8356a2a282a9d9f855 Mon Sep 17 00:00:00 2001 From: juha Date: Tue, 21 Apr 2015 17:29:48 +0000 Subject: [PATCH] IDE: In BuildMode config dialog, prevent hiding Name in the grid when InSession is not shown. Issue #27881. git-svn-id: trunk@48796 - --- ide/buildmodesmanager.pas | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ide/buildmodesmanager.pas b/ide/buildmodesmanager.pas index ee8d3ebdd4..b54718a223 100644 --- a/ide/buildmodesmanager.pas +++ b/ide/buildmodesmanager.pas @@ -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;