Jump to content
pyscripter

Feature enhancement request - Filter DFM properties

Recommended Posts

I very much like the "Filter Explicit properties" expert.

However, in recent versions of Delphi (not sure when it started), the IDE inserts annoying DesignSize properties  that "pollute" the Dfm and the revision history.  It would be really nice if the expert was renamed "Filter DFM properties" and included the option of removing these DesignSize properties.

Edited by pyscripter
  • Like 3

Share this post


Link to post

I see Top/Left/Width/Height/ClientWidth/ClientHeight change a lot, too--and I'm pretty sure I don't move those components every time I open a form.

  • Like 2

Share this post


Link to post

The filter for the Explicit* properties was contributed by Achim Kalwa and I have never looked closely at the code, so I don't know how it works and whether it might allow filtering other properties.

Share this post


Link to post
On 10/21/2024 at 12:30 PM, corneliusdavid said:

I see Top/Left/Width/Height/ClientWidth/ClientHeight change a lot, too--and I'm pretty sure I don't move those components every time I open a form.

This was a constant issue for me. Doing nothing other than opening a form and closing it would prompt me to save changes and update component positions in the DFM.

 

Until I started using DPI Unaware mode (bds.exe "/highdpi:unaware"). Now it never occurs.

  • Thanks 1

Share this post


Link to post
4 minutes ago, JonRobertson said:

Until I started using DPI Unaware mode (bds.exe "/highdpi:unaware"). Now it never occurs.

Oh really!? I hadn't thought of that but I'm starting to use DPI Unaware mode more often because there are constant annoying font size changes almost every other time I click on something or pull down a menu. Here is definitely another advantage.

Share this post


Link to post

I was talking to someone the other day about this too. I had thought about creating an IDE add-in to effectively "lock the form," where it ignores all those "accidental" changes. I think it would be really useful to also ignore things like active tab in the tab control, etc. Usually when I'm submitting changes in source control I only want to submit the minimum changes for the fix I made, but then I want to make sure that that subset works, so I have to revert unneeded changes, test that code state, and then submit it. So a filter or lock would be really helpful.

  • Like 3

Share this post


Link to post
12 hours ago, Jim McKeeth said:

I had thought about creating an IDE add-in to effectively "lock the form," where it ignores all those "accidental" changes.

That'd be great. I have tried Delphi's "Lock Controls" (on the Edit menu) but it only lasts for the current session (when you close and re-load, it's off again) and I don't remember to turn it back on. Also, when using Delphi in DPI-Aware mode, there are still changes even when I don't touch anything; I just pulled up a fairly simple form and closed it without moving anything and 12 lines of changes showed up in my Git diff, half were ExplicitXXX properties because I had the GExperts feature off, the others were ItemHeight, ClientHeight, etc.; Using DPI-Unaware mode, nothing changed (thanks, @JonRobertson for that observation!).

  • Like 1

Share this post


Link to post
13 hours ago, Jim McKeeth said:

I had thought about creating an IDE add-in to effectively "lock the form," where it ignores all those "accidental" changes.

That would be useful. Or the ability to select which property changes you want ignored. The main downside would be remembering to turn off the "lock" when I intentionally make changes that I want to save.

 

I use Beyond Compare before every commit and I'm in the habit of undoing unwanted or accidental form changes. I have been for over a decade now. :classic_wacko:

  • Like 1

Share this post


Link to post
13 minutes ago, Uwe Raabe said:

a couple of other users

The understatement of the year.

Share this post


Link to post

We've given up on HighDPI. It is just not worth the effort and grievance for a project that has entered care and maintenance, even if the users would greatly benefit from it.

Share this post


Link to post
5 minutes ago, Lars Fosdal said:

We've given up on HighDPI. It is just not worth the effort and grievance for a project that has entered care and maintenance, even if the users would greatly benefit from it.

Ditto.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×