kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #03191
Layers and elements visibility (internals)
Greetings to All,
I changed the way how visibility is treated internaly.
Changed 26 files:
3d-viewer/3d_draw.cpp
gerbview/gerbview_config.h
gerbview/set_color.cpp
gerbview/set_color.h
gerbview/trpiste.cpp
include/colors.h
include/pcbstruct.h
pcbnew/basepcbframe.cpp
pcbnew/class_cotation.cpp
pcbnew/class_drawsegment.cpp
pcbnew/class_edge_mod.cpp
pcbnew/class_mire.cpp
pcbnew/class_module.cpp
pcbnew/class_pcb_text.cpp
pcbnew/class_text_mod.cpp
pcbnew/class_track.cpp
pcbnew/class_zone.cpp
pcbnew/classpcb.cpp
pcbnew/controle.cpp
pcbnew/dialog_general_options.cpp
pcbnew/ioascii.cpp
pcbnew/locate.cpp
pcbnew/pcbcfg.cpp
pcbnew/set_color.cpp
pcbnew/tool_pcb.cpp
pcbnew/toolbars_update_user_interface.cpp
Almost done, only dialog "Layer color and visibility" half broken yet.
When I arrive home I will finish it. I will just make the colors dialog work again, enhancements I will leave for later.
Found some interesting things:
1) gerbview/gerbview_config.h was using variable "g_DesignSettings.m_PcbGridColor", but the color Gerbview uses come from "g_GridColor". I suppose this made Gerbvied changes to grid color not being preserved betweens sessions.
2) include/pcbstruct.h:
EDA_BoardDesignSettings members not used: m_PcbGridColor, m_ModuleTextCMPColor, m_ModuleTextCUColor, m_ModuleTextNOVColor, m_AnchorColor, m_PadCUColor, m_PadCMPColor.
Following global variables used instead:
common.cpp: g_GridColor
pcbcommon.cpp: g_AnchorColor, g_ModuleTextCMPColor, g_ModuleTextCUColor, g_ModuleTextNOVColor, g_PadCUColor, g_PadCMPColor.
I understand this separation may have been due to to the fact that some variables are used only by Pcbnew and others by other targets also (even by Eeschema: grid color), but could we arrange things a little better?
Best regards,
Isaac