[scribus-dev] 0012245: Grouped lines appear thicker

Craig Bradney cbradney at scribus.info
Tue Nov 17 21:16:22 UTC 2015


> 
> this line of code arises a few questions:
> 
> - why is "double groupWidth" defined in pageitem.h and not in pageitem_group.h?

If its old, it might have originated there. Maybe there’s functions required by all page item types that use it, or maybe its common to all page items.

> - what is the difference between m_width and groupWidth?
> - why does width have a m_ prefix and groupWidth does not have it?
> 

Already explained in other emails.

> 
> just a reference, if you look further down in pageitem.h you see:
> 
> double oldXpos; ///< Stores the old X-position for undo action. Is used to detect move actions.
> 
> that's an example of doxygen doc.
> 
> 
> is not in my eyes a perfect doxygen comment:
> 
> double oldXpos; ///< used for detecting move actions .
> 
> would probably have been better, since the name of the class member variables already says that it's an old x position... we should try to keep them as short as possible and only document what we could not write in the name itself.
> 

A variable does nothing itself, so your description isn’t better really. The first is better. Otherwise, it should be called oldXPosforUndo. Maybe thats even better. Personally, I think it should be removed entirely as the undo data should hold that. I’ve tried that once or twice before but didn’t succeed, but also because undo code needs rewriting.

Craig




More information about the scribus-dev mailing list