kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #04094
About ayer widget
-
To:
kicad-devel@xxxxxxxxxxxxxxx
-
From:
"jean-pierre.charras@..." <jean-pierre.charras@...>
-
Date:
Sat, 30 Jan 2010 16:27:30 +0100
-
In-reply-to:
<4B634301.6010801@...>
-
User-agent:
Thunderbird 2.0.0.23 (Windows/20090812)
Dick,
In my last commit, i wrote PCB_LAYER_WIDGET::RenderSynchronize( ) to
update the check boxes state in the layer manager when an item
visibility is changed outside the layer manager (from the left toolbar
for instance, or some hot keys)
I do not like the code I wrote, because i can be easily broken if the
layer manager is modified.
But Checkboxes can be updated without calling Refill() that creates flicker.
The main problem I found is the fact it is not easy to reach the check
boxes in the layer manager because the pointer to these check boxes
exist only in sizers.
Because it could be interesting to update more easily these check boxes
with very few new code, i believe an easy way to do that it to set (for
check boxes we want to update) a wxValidator, and just call
TransferDataToWindow to update all checkboxes
from PCB_LAYER_WIDGET class, the requirement is just use bools (and not
a mask) to handle items visibility, but it should not be a problem.
Inside layer_widget the changes are small :
void AppendRenderRow and AppendLayerRow could return a pointer to the
corresponding checkbox,
and AppendLayerRows and AppendRenderRows an array of pointers.
PCB_LAYER_WIDGET functions could set a wxValidator for check boxes (or
store the list of checkboxes, if we do not use validators)
Inside the EDA_BoardDesignSettings class, use an array of bools to
handle enabled and visible layers and items
but they are not directly acceded, so the cost is small.
I never used validators and TransferDataToWindow , so I like to know
your thoughts about this.
--
Jean-Pierre CHARRAS
Maître de conférences
Directeur d'études 2ieme année.
Génie Electrique et Informatique Industrielle 2
Institut Universitaire de Technologie 1 de Grenoble
BP 67, 38402 St Martin d'Heres Cedex
Recherche :
GIPSA-LAB - INPG
Rue de la Houille Blanche
38400 Saint Martin d'Heres
Follow ups
References