Le 12/04/2017 à 00:45, Uwe Stöhr a écrit :
So why should I use an empty length as default?

It is a concept I introduced to clean-up odditieds in the InsetBox code.

Assume that you want to indicate "I do not have a width". It looks reasonable to indicate this by the value "". And instead of looking inside the Length object to know whether it is default, you can use Length::empty(), which is different from Length==0.

Where do you see "-9.99col%" in my commits? You confused me.

I was wrong, it was -999% actually. From your commit 22ad7e43:
+       // "-999col%" is the code for no width
+       if ((params.width).asString() == "-999col%")
+               widthCB->setCheckState(Qt::Unchecked);

I hope that you can see how using such an arbitrary value as default is not as good as something that says "Hi, I am a llength and I do know that I am the default value, because I am empty".

JMarc

Reply via email to