← Back to team overview

kicad-developers team mailing list archive

Re: Patch for changing the way visibility is treated internally

 

--- In kicad-devel@xxxxxxxxxxxxxxx, Dick Hollenbeck <dick@...> wrote:
>
> Isaac wrote:
> > Greetings,
> >
> > This file <http://f1.grp.yahoofs.com/v1/YMnHShqPpLZM3kQK6MlL1Ncf5dJNj-1YDqgmtNCy6O_yjLOiFWo6hTyIRVod28xjeRI3pfblmwQoCecW9u2PQTVqMr_wKSU8XYRtF90/KiCAD%20Rev%201984%20-%20IsLayerVisible%20etc.zip> contains the patch.
> >
> > I did many tests and found no obvoius bugs, but it makes deep changes, I would expected something broken.
> >
> > The work is not totally completed because some incongruencies remained.I would like to discuss with the group before I take further steps or discard it all.
> >
> > After some reflection I think that the new visibilty flags and methods should be moved from class EDA_BoardDesignSettings to the class DISPLAY_OPTIONS.
> >
> >
> > It would be better if we create proxy methods in class BOARD which callthe appropriate methods in EDA_BoardDesignSettings or DISPLAY_OPTIONS. Then all other classes would use them from class BOARD, instad of from global objects. In my opinion it would be semantically more correct.
> >
> >
> > Best regards,
> >
> > Isaac
> >
> >   
> 
> Isaac,
> 
> I am unable to obtain the patch file.
> 
> Please simply try attaching it to the email that you send to this list.
> 
> What do you mean by this statement?
> 
> "I would like to discuss with the group before I take further steps or discard it all."

Dick,

Perhaps I ill expressed myself (English is not my native language). Not exactly "it all", but make extensive changes, perhaps making it look completely different.

I didn't myself get 100% satisfied with the solution. For layers It is OK, because it encapsulates all visibility-related issues togheter, even saving/restoring the state to the brd file.

But for individual classes of elements I didn't got it quite right. I created a method "IsElementVisible" (bad name choice, deceiving) which takes an int to identify the category being tested (as an enum created by me). Not all categories in the visibility dialog are included in this schema and mostdon't save/restore along with the file.

If somebody have a better idea, I'm inclined to rework it all.


About the attachment, I couldn't find a way to do it from the web page, andif I try to reply from my e-mail client (thunderbird) the server refuses my post. Until I learn how to do it right, I will send the patch directly toyour e-mail.

Best regards,

Isaac









References