GUI component : Default value in 'Constructor params' causes Error C2572 redefinition of default parameter

Using Projucer, I created a GUI component PreferencesDialog (parent class DialogWindow) and set Constructor params as

const String &name, 
Colour backgroundColour, 
bool escapeKeyTriggersCloseButton, 
bool addToDesktop=true

My problem is that in PreferencesDialog.cpp Projucer creates

PreferencesDialog::PreferencesDialog (const String &name, 
Colour backgroundColour, bool escapeKeyTriggersCloseButton, bool addToDesktop=true)

which causes error C2572 “Redefinition of default parameter”. By removing =true manually in Visual Studio, I can temporarily solve the problem but once I reopen the project again by clicking Save and Open in IDE, =true is back again (in the cpp file).
Since there is only one Constructor params text area to enter the parameters, I assume that defaults should be automatically removed when the cpp file is created. Or, if not, Projucer does not allow default parameters. Which imho does not make sense.

What am I doing wrong?
Thanks!

Default parameters for GUI components aren’t supported. The GUI editor should only really be used for very simple classes, anything more complex and you will be much better off just writing the code yourself.

Thanks! Just out of curiosity: Are there plans to extend the GUI editor? A powerful GUI editor can improve productivity a lot.

No, the GUI editor has been deprecated for a while now and there are no plans to continue working on it. See the following post for some more info:

Ah, ok, thanks! I’ll have a look at ‘things like’ :wink: