You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

484 lines
22 KiB

18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
  1. /******************/
  2. /** eeconfig.cpp **/
  3. /******************/
  4. #include "fctsys.h"
  5. #include "appl_wxstruct.h"
  6. #include "gr_basic.h"
  7. #include "common.h"
  8. #include "eeschema_id.h"
  9. #include "class_drawpanel.h"
  10. #include "confirm.h"
  11. #include "gestfich.h"
  12. #include "program.h"
  13. #include "general.h"
  14. #include "protos.h"
  15. #include "eeschema_config.h"
  16. #include "worksheet.h"
  17. #include "hotkeys.h"
  18. #include "dialog_eeschema_options.h"
  19. #define HOTKEY_FILENAME wxT( "eeschema" )
  20. void WinEDA_SchematicFrame::Process_Config( wxCommandEvent& event )
  21. {
  22. int id = event.GetId();
  23. wxPoint pos;
  24. wxFileName fn;
  25. wxGetMousePosition( &pos.x, &pos.y );
  26. pos.y += 5;
  27. switch( id )
  28. {
  29. case ID_COLORS_SETUP:
  30. DisplayColorSetupFrame( this, pos );
  31. break;
  32. case ID_CONFIG_REQ: // Display the configuration window.
  33. InstallConfigFrame( pos );
  34. break;
  35. case ID_CONFIG_SAVE:
  36. SaveProjectFile( this, false );
  37. break;
  38. case ID_CONFIG_READ:
  39. {
  40. fn = g_RootSheet->m_AssociatedScreen->m_FileName;
  41. fn.SetExt( ProjectFileExtension );
  42. wxFileDialog dlg( this, _( "Read Project File" ), fn.GetPath(),
  43. fn.GetFullName(), ProjectFileWildcard,
  44. wxFD_OPEN | wxFD_FILE_MUST_EXIST );
  45. if( dlg.ShowModal() == wxID_CANCEL )
  46. break;
  47. LoadProjectFile( fn.GetFullPath(), TRUE );
  48. }
  49. break;
  50. /* Hotkey IDs */
  51. case ID_PREFERENCES_HOTKEY_CREATE_CONFIG:
  52. fn = wxFileName( ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice ),
  53. HOTKEY_FILENAME,
  54. DEFAULT_HOTKEY_FILENAME_EXT );
  55. WriteHotkeyConfigFile( fn.GetFullPath(), s_Eeschema_Hokeys_Descr, true );
  56. break;
  57. case ID_PREFERENCES_HOTKEY_READ_CONFIG:
  58. Read_Hotkey_Config( this, true );
  59. break;
  60. case ID_PREFERENCES_HOTKEY_EDIT_CONFIG:
  61. {
  62. fn = wxFileName( ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice ),
  63. HOTKEY_FILENAME, DEFAULT_HOTKEY_FILENAME_EXT );
  64. wxString editorname = wxGetApp().GetEditorName();
  65. if( !editorname.IsEmpty() )
  66. ExecuteFile( this, editorname, QuoteFullPath( fn ) );
  67. }
  68. break;
  69. case ID_PREFERENCES_HOTKEY_PATH_IS_HOME:
  70. case ID_PREFERENCES_HOTKEY_PATH_IS_KICAD:
  71. HandleHotkeyConfigMenuSelection( this, id );
  72. break;
  73. case ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST:
  74. // Display current hotkey list for eeschema.
  75. DisplayHotkeyList( this, s_Schematic_Hokeys_Descr );
  76. break;
  77. default:
  78. DisplayError( this, wxT( "WinEDA_SchematicFrame::Process_Config internal error" ) );
  79. }
  80. }
  81. void WinEDA_SchematicFrame::OnSetOptions( wxCommandEvent& event )
  82. {
  83. wxArrayString units;
  84. GridArray& grid_list = GetBaseScreen()->m_GridList;
  85. DIALOG_EESCHEMA_OPTIONS dlg( this );
  86. wxLogDebug( wxT( "Current grid array index %d." ),
  87. grid_list.Index( GetBaseScreen()->GetGrid() ) );
  88. units.Add( GetUnitsLabel( INCHES ) );
  89. units.Add( GetUnitsLabel( MILLIMETRE ) );
  90. dlg.SetUnits( units, g_UnitMetric );
  91. dlg.SetGridSizes( grid_list, GetBaseScreen()->GetGridId() );
  92. dlg.SetLineWidth( g_DrawDefaultLineThickness );
  93. dlg.SetTextSize( g_DefaultTextLabelSize );
  94. dlg.SetRepeatHorizontal( g_RepeatStep.x );
  95. dlg.SetRepeatVertical( g_RepeatStep.y );
  96. dlg.SetRepeatLabel( g_RepeatDeltaLabel );
  97. dlg.SetShowGrid( m_Draw_Grid );
  98. dlg.SetShowHiddenPins( m_ShowAllPins );
  99. dlg.SetEnableAutoPan( DrawPanel->m_AutoPAN_Enable );
  100. dlg.SetEnableAnyBusOrientation( g_HVLines );
  101. dlg.SetShowPageLimits( g_ShowPageLimits );
  102. dlg.Layout();
  103. dlg.Fit();
  104. dlg.SetMinSize( dlg.GetSize() );
  105. if( dlg.ShowModal() == wxID_CANCEL )
  106. return;
  107. g_UnitMetric = dlg.GetUnitsSelection();
  108. GetBaseScreen()->SetGrid(
  109. grid_list[ (size_t) dlg.GetGridSelection() ].m_Size );
  110. g_DrawDefaultLineThickness = dlg.GetLineWidth();
  111. g_DefaultTextLabelSize = dlg.GetTextSize();
  112. g_RepeatStep.x = dlg.GetRepeatHorizontal();
  113. g_RepeatStep.y = dlg.GetRepeatVertical();
  114. g_RepeatDeltaLabel = dlg.GetRepeatLabel();
  115. m_Draw_Grid = dlg.GetShowGrid();
  116. m_ShowAllPins = dlg.GetShowHiddenPins();
  117. DrawPanel->m_AutoPAN_Enable = dlg.GetEnableAutoPan();
  118. g_HVLines = dlg.GetEnableAnyBusOrientation();
  119. g_ShowPageLimits = dlg.GetShowPageLimits();
  120. DrawPanel->Refresh( true );
  121. }
  122. /*
  123. * Read the hotkey files config for eeschema and libedit
  124. */
  125. bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
  126. {
  127. wxString FullFileName = ReturnHotkeyConfigFilePath(
  128. g_ConfigFileLocationChoice );
  129. FullFileName += HOTKEY_FILENAME;
  130. FullFileName += wxT( "." );
  131. FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
  132. frame->ReadHotkeyConfigFile( FullFileName,
  133. s_Eeschema_Hokeys_Descr,
  134. verbose );
  135. return TRUE;
  136. }
  137. /**
  138. * Return project file parameter list for EESchema.
  139. *
  140. * Populate the project file parameter array specific to EESchema if it hasn't
  141. * already been populated and return a reference to the array to the caller.
  142. * Creating the parameter list at run time has the advantage of being able
  143. * to define local variables. The old method of statically building the array
  144. * at compile time requiring global variable definitions.
  145. */
  146. PARAM_CFG_ARRAY& WinEDA_SchematicFrame::GetProjectFileParameters( void )
  147. {
  148. if( !m_projectFileParams.empty() )
  149. return m_projectFileParams;
  150. m_projectFileParams.push_back( new PARAM_CFG_WXSTRING( wxT( "LibDir" ),
  151. &m_UserLibraryPath ) );
  152. m_projectFileParams.push_back( new PARAM_CFG_LIBNAME_LIST( wxT( "LibName" ),
  153. &m_ComponentLibFiles,
  154. GROUPLIB ) );
  155. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "NetFmt" ),
  156. &m_NetlistFormat,
  157. NET_TYPE_PCBNEW,
  158. NET_TYPE_PCBNEW,
  159. NET_TYPE_CUSTOM_MAX ) );
  160. /* NOTE: Left as global until supporting code can be fixed. */
  161. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "HPGLSpd" ),
  162. &g_HPGL_Pen_Descr.m_Pen_Speed,
  163. 20, 2, 45 ) );
  164. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "HPGLDm" ),
  165. &g_HPGL_Pen_Descr.m_Pen_Diam,
  166. 15, 1, 150 ) );
  167. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "HPGLNum" ),
  168. &g_HPGL_Pen_Descr.m_Pen_Num,
  169. 1, 1, 8 ) );
  170. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offX_A4" ),
  171. &g_Sheet_A4.m_Offset.x ) );
  172. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offY_A4" ),
  173. &g_Sheet_A4.m_Offset.y ) );
  174. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offX_A3" ),
  175. &g_Sheet_A3.m_Offset.x ) );
  176. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offY_A3" ),
  177. &g_Sheet_A3.m_Offset.y ) );
  178. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offX_A2" ),
  179. &g_Sheet_A2.m_Offset.x ) );
  180. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offY_A2" ),
  181. &g_Sheet_A2.m_Offset.y ) );
  182. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offX_A1" ),
  183. &g_Sheet_A1.m_Offset.x ) );
  184. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offY_A1" ),
  185. &g_Sheet_A1.m_Offset.y ) );
  186. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offX_A0" ),
  187. &g_Sheet_A0.m_Offset.x ) );
  188. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offY_A0" ),
  189. &g_Sheet_A0.m_Offset.y ) );
  190. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offX_A" ),
  191. &g_Sheet_A.m_Offset.x ) );
  192. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offY_A" ),
  193. &g_Sheet_A.m_Offset.y ) );
  194. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offX_B" ),
  195. &g_Sheet_B.m_Offset.x ) );
  196. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offY_B" ),
  197. &g_Sheet_B.m_Offset.y ) );
  198. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offX_C" ),
  199. &g_Sheet_C.m_Offset.x ) );
  200. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offY_C" ),
  201. &g_Sheet_C.m_Offset.y ) );
  202. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offX_D" ),
  203. &g_Sheet_D.m_Offset.x ) );
  204. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offY_D" ),
  205. &g_Sheet_D.m_Offset.y ) );
  206. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offX_E" ),
  207. &g_Sheet_E.m_Offset.x ) );
  208. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "offY_E" ),
  209. &g_Sheet_E.m_Offset.y ) );
  210. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "RptD_X" ),
  211. &g_RepeatStep.x,
  212. 0, -1000, +1000 ) );
  213. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "RptD_Y" ),
  214. &g_RepeatStep.y,
  215. 100, -1000, +1000 ) );
  216. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "RptLab" ),
  217. &g_RepeatDeltaLabel,
  218. 1, -10, +10 ) );
  219. m_projectFileParams.push_back( new PARAM_CFG_WXSTRING( wxT( "SimCmd" ),
  220. &g_SimulatorCommandLine ) );
  221. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "UseNetN" ),
  222. &g_OptNetListUseNames,
  223. 0, 0, 1 ) );
  224. m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "LabSize" ),
  225. &g_DefaultTextLabelSize,
  226. DEFAULT_SIZE_TEXT, 0,
  227. 1000 ) );
  228. return m_projectFileParams;
  229. }
  230. /*
  231. * Load the Kicad project file (*.pro) settings specific to EESchema.
  232. */
  233. bool WinEDA_SchematicFrame::LoadProjectFile( const wxString& CfgFileName,
  234. bool ForceRereadConfig )
  235. {
  236. wxFileName fn;
  237. bool IsRead = TRUE;
  238. wxArrayString liblist_tmp = m_ComponentLibFiles;
  239. if( CfgFileName.IsEmpty() )
  240. fn = g_RootSheet->m_AssociatedScreen->m_FileName;
  241. else
  242. fn = CfgFileName;
  243. m_ComponentLibFiles.Clear();
  244. /* Change the schematic file extension (.sch) to the project file
  245. * extension (.pro). */
  246. fn.SetExt( ProjectFileExtension );
  247. wxGetApp().RemoveLibraryPath( m_UserLibraryPath );
  248. if( !wxGetApp().ReadProjectConfig( fn.GetFullPath(), GROUP,
  249. GetProjectFileParameters(),
  250. ForceRereadConfig ? FALSE : TRUE ) )
  251. {
  252. m_ComponentLibFiles = liblist_tmp;
  253. IsRead = FALSE;
  254. }
  255. /* User library path takes precedent over default library search paths. */
  256. wxGetApp().InsertLibraryPath( m_UserLibraryPath, 1 );
  257. /* If the list is void, force loadind the library "power.lib" that is
  258. * the "standard" library for power symbols.
  259. */
  260. if( m_ComponentLibFiles.GetCount() == 0 )
  261. m_ComponentLibFiles.Add( wxT( "power" ) );
  262. SetDrawBgColor( g_DrawBgColor );
  263. LoadLibraries();
  264. GetBaseScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
  265. return IsRead;
  266. }
  267. /*
  268. * Save the Kicad project file (*.pro) settings specific to EESchema.
  269. */
  270. void WinEDA_SchematicFrame::SaveProjectFile( wxWindow* displayframe, bool askoverwrite )
  271. {
  272. wxFileName fn;
  273. fn = g_RootSheet->m_AssociatedScreen->m_FileName /*ConfigFileName*/;
  274. fn.SetExt( ProjectFileExtension );
  275. int options = wxFD_SAVE;
  276. if( askoverwrite )
  277. options |= wxFD_OVERWRITE_PROMPT;
  278. wxFileDialog dlg( this, _( "Save Project Settings" ), wxGetCwd(),
  279. fn.GetFullName(), ProjectFileWildcard, options );
  280. if( dlg.ShowModal() == wxID_CANCEL )
  281. return;
  282. wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP,
  283. GetProjectFileParameters() );
  284. }
  285. static const wxString DefaultDrawLineWidthEntry( wxT( "DefaultDrawLineWidth" ) );
  286. static const wxString ShowHiddenPinsEntry( wxT( "ShowHiddenPins" ) );
  287. static const wxString HorzVertLinesOnlyEntry( wxT( "HorizVertLinesOnly" ) );
  288. /*
  289. * Return the EESchema applications settings list.
  290. *
  291. * This replaces the old statically define list that had the project
  292. * file settings and the application settings mixed together. This
  293. * was confusing and caused some settings to get saved and loaded
  294. * incorrectly. Currently, only the settings that are needed at start
  295. * up by the main window are defined here. There are other locally used
  296. * settings scattered thoughout the EESchema source code. If you need
  297. * to define a configuration setting that need to be loaded at run time,
  298. * this is the place to define it.
  299. *
  300. * TODO: Define the configuration variables as member variables instead of
  301. * global variables or move them to the object class where they are
  302. * used.
  303. */
  304. PARAM_CFG_ARRAY& WinEDA_SchematicFrame::GetConfigurationSettings( void )
  305. {
  306. if( !m_configSettings.empty() )
  307. return m_configSettings;
  308. m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "Unite" ),
  309. &g_UnitMetric, 0, 0, 1 ) );
  310. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColWire" ),
  311. &g_LayerDescr.LayerColor[LAYER_WIRE],
  312. GREEN ) );
  313. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorBus" ),
  314. &g_LayerDescr.LayerColor[LAYER_BUS],
  315. BLUE ) );
  316. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorConn" ),
  317. &g_LayerDescr.LayerColor[LAYER_JUNCTION],
  318. GREEN ) );
  319. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLlab" ),
  320. &g_LayerDescr.LayerColor[LAYER_LOCLABEL],
  321. BLACK ) );
  322. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorHlab" ),
  323. &g_LayerDescr.LayerColor[LAYER_HIERLABEL],
  324. BROWN ) );
  325. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorGbllab" ),
  326. &g_LayerDescr.LayerColor[LAYER_GLOBLABEL],
  327. RED ) );
  328. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorPinF" ),
  329. &g_LayerDescr.LayerColor[LAYER_PINFUN],
  330. MAGENTA ) );
  331. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColPinN" ),
  332. &g_LayerDescr.LayerColor[LAYER_PINNUM],
  333. RED ) );
  334. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorPNam" ),
  335. &g_LayerDescr.LayerColor[LAYER_PINNAM],
  336. CYAN ) );
  337. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorField" ),
  338. &g_LayerDescr.LayerColor[LAYER_FIELDS],
  339. MAGENTA ) );
  340. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorRef" ),
  341. &g_LayerDescr.LayerColor[LAYER_REFERENCEPART],
  342. CYAN ) );
  343. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorValue" ),
  344. &g_LayerDescr.LayerColor[LAYER_VALUEPART],
  345. CYAN ) );
  346. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorNote" ),
  347. &g_LayerDescr.LayerColor[LAYER_NOTES],
  348. LIGHTBLUE ) );
  349. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorBody" ),
  350. &g_LayerDescr.LayerColor[LAYER_DEVICE],
  351. RED ) );
  352. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorBodyBg" ),
  353. &g_LayerDescr.LayerColor[LAYER_DEVICE_BACKGROUND],
  354. LIGHTYELLOW ) );
  355. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorNetN" ),
  356. &g_LayerDescr.LayerColor[LAYER_NETNAM],
  357. DARKGRAY ) );
  358. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorPin" ),
  359. &g_LayerDescr.LayerColor[LAYER_PIN],
  360. RED ) );
  361. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorSheet" ),
  362. &g_LayerDescr.LayerColor[LAYER_SHEET],
  363. MAGENTA ) );
  364. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true,
  365. wxT( "ColorSheetFileName" ),
  366. &g_LayerDescr.LayerColor[LAYER_SHEETFILENAME],
  367. BROWN ) );
  368. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorSheetName" ),
  369. &g_LayerDescr.LayerColor[LAYER_SHEETNAME],
  370. CYAN ) );
  371. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorSheetLab" ),
  372. &g_LayerDescr.LayerColor[LAYER_SHEETLABEL],
  373. BROWN ) );
  374. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorNoCo" ),
  375. &g_LayerDescr.LayerColor[LAYER_NOCONNECT],
  376. BLUE ) );
  377. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorErcW" ),
  378. &g_LayerDescr.LayerColor[LAYER_ERC_WARN],
  379. GREEN ) );
  380. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorErcE" ),
  381. &g_LayerDescr.LayerColor[LAYER_ERC_ERR],
  382. RED ) );
  383. m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorGrid" ),
  384. &g_GridColor,
  385. DARKDARKGRAY ) );
  386. return m_configSettings;
  387. }
  388. /*
  389. * Load the EESchema configuration parameters.
  390. */
  391. void WinEDA_SchematicFrame::LoadSettings()
  392. {
  393. wxASSERT( wxGetApp().m_EDA_Config != NULL );
  394. wxConfig* cfg = wxGetApp().m_EDA_Config;
  395. WinEDA_DrawFrame::LoadSettings();
  396. wxGetApp().ReadCurrentSetupValues( GetConfigurationSettings() );
  397. g_DrawDefaultLineThickness = cfg->Read( DefaultDrawLineWidthEntry,
  398. (long) 6 );
  399. cfg->Read( ShowHiddenPinsEntry, &m_ShowAllPins, false );
  400. cfg->Read( HorzVertLinesOnlyEntry, &g_HVLines, true );
  401. }
  402. /*
  403. * Save the EESchema configuration parameters.
  404. */
  405. void WinEDA_SchematicFrame::SaveSettings()
  406. {
  407. wxASSERT( wxGetApp().m_EDA_Config != NULL );
  408. wxConfig* cfg = wxGetApp().m_EDA_Config;
  409. WinEDA_DrawFrame::SaveSettings();
  410. wxGetApp().SaveCurrentSetupValues( GetConfigurationSettings() );
  411. cfg->Write( DefaultDrawLineWidthEntry, (long) g_DrawDefaultLineThickness );
  412. cfg->Write( ShowHiddenPinsEntry, m_ShowAllPins );
  413. cfg->Write( HorzVertLinesOnlyEntry, g_HVLines );
  414. }