Noise in git history related to TComboBox.ItemHeight changes (Delphi)

  Kiến thức lập trình

A client with a successful Delphi 7 application recently got in touch for some updates. While working on the project, I’ve noticed again something that has long bugged me.

Oftentimes simply opening and viewing a VCL form reveals git changes like the following at check-in:

-          ItemHeight = 25
+          ItemHeight = 0

At other times, it might be the other way round:

-          ItemHeight = 0
+          ItemHeight = 19

Usually there are no changes in ItemHeight fields.

This appears to only affect TComboBox controls. The Height of TComboBox controls is determined by its’ font’s Height and other properties. As far as I can tell, it doesn’t matter whether I check in the change or revert – the exact same behaviour is displayed at runtime. Reverting the changes is what I typically do, but this is tedious if there are dozens of them.

There is no discernible pattern as to whether or where changes will happen, and if they do which way the changes will go. Often the switch happens on TComboBox controls in areas or on TTabSheet pages that were never even viewed.

Note: No subtantive modifications are being made in the IDE to the form, except perhaps to the odd TPageControl.ActivePage property or a minor change like adding a TLabel.

My questions are related:

  • Is there a way to prevent these “noise” changes in the history?
  • Is this a bug in Delphi 7 which is resolved in later versions of Delphi and the VCL?

LEAVE A COMMENT