• Maciej Suminski's avatar
    Removed D_PAD::SetNetname() function and D_PAD::m_Netname, D_PAD::m_ShortNetname fields. · 654e7e55
    Maciej Suminski authored
    D_PAD::GetNetname() and D_PAD::GetShortNetname() were moved to BOARD_CONNECTED_ITEM. Now they use the net name stored in NETINFO_ITEM.
    Moved some one-line functions from class_board_connected_item.cpp to class_board_connected_item.h.
    Added a copyright notice, moved Doxygen comments from class_board_connected_item.cpp to class_board_connected_item.h.
    
    I have some doubts if changes introduced pcbnew/dialogs/dialog_pad_properties.cpp do not break anything, but I could not find a test case that breaks the pcbnew.
    
    Performed tests:
    - changed pad's net name from empty to existent - ok, name was changed
    - changed pad's net name from empty to nonexistent - ok, error message is displayed, net name stays empty
    - changed pad's net name from existent to empty - ok, net name became empty
    - changed pad's net name from existent to nonexistent - ok, error message is displayed, net name is not changed
    - (re)reading netlists, including net changes - fine, changes are applied, but empty nets are still kept
    - loaded pcbnew/pcad2kicadpcb_plugin/examples/CK1202_V1.pcb to test P-CAD import plugin - ok, net names are correct
    - imported an Eagle 6.0 board (Arduino Uno; http://arduino.cc/en/uploads/Main/arduino_Uno_Rev3-02-TH.zip) then saved in .kicad_pcb format and reloaded - ok, net names are correct
    - saved demos/video/video.kicad_pcb in legacy format and then loaded it again - ok, net names are correct
    654e7e55
pcb.cpp 28.3 KB