Commit 67d98658 authored by jean-pierre charras's avatar jean-pierre charras

minor cleanup. minor enhancements. Finish file housekeeping. add Bug 682586...

minor cleanup. minor enhancements. Finish file housekeeping. add Bug 682586 fix from Mark van Doesburg.
parent 8e0937e6
...@@ -741,13 +741,13 @@ void PARAM_CFG_LIBNAME_LIST::SaveParam( wxConfigBase* aConfig ) ...@@ -741,13 +741,13 @@ void PARAM_CFG_LIBNAME_LIST::SaveParam( wxConfigBase* aConfig )
wxArrayString* libname_list = m_Pt_param; wxArrayString* libname_list = m_Pt_param;
unsigned indexlib = 0; unsigned indexlib = 0;
wxString cle_config; wxString configkey;
for( ; indexlib < libname_list->GetCount(); indexlib++ ) for( ; indexlib < libname_list->GetCount(); indexlib++ )
{ {
cle_config = m_Ident; configkey = m_Ident;
// We use indexlib+1 because first lib name is LibName1 // We use indexlib+1 because first lib name is LibName1
cle_config << (indexlib + 1); configkey << (indexlib + 1);
aConfig->Write( cle_config, libname_list->Item( indexlib ) ); aConfig->Write( configkey, libname_list->Item( indexlib ) );
} }
} }
...@@ -140,7 +140,7 @@ found in the default search paths." ), ...@@ -140,7 +140,7 @@ found in the default search paths." ),
BOOST_FOREACH( COMPONENT& component, m_components ) BOOST_FOREACH( COMPONENT& component, m_components )
{ {
m_ListCmp->SetSelection( ii, true ); m_ListCmp->SetSelection( ii++, true );
if( !component.m_Module.IsEmpty() ) if( !component.m_Module.IsEmpty() )
continue; continue;
...@@ -169,7 +169,5 @@ any of the project footprint libraries." ), ...@@ -169,7 +169,5 @@ any of the project footprint libraries." ),
this ); this );
} }
} }
ii += 1;
} }
} }
...@@ -355,8 +355,6 @@ void WinEDA_CvpcbFrame::ToFirstNA( wxCommandEvent& event ) ...@@ -355,8 +355,6 @@ void WinEDA_CvpcbFrame::ToFirstNA( wxCommandEvent& event )
ii++; ii++;
} }
wxBell();
m_ListCmp->SetSelection( selection ); m_ListCmp->SetSelection( selection );
} }
...@@ -384,8 +382,6 @@ void WinEDA_CvpcbFrame::ToPreviousNA( wxCommandEvent& event ) ...@@ -384,8 +382,6 @@ void WinEDA_CvpcbFrame::ToPreviousNA( wxCommandEvent& event )
} }
ii--; ii--;
} }
wxBell();
m_ListCmp->SetSelection( selection ); m_ListCmp->SetSelection( selection );
} }
......
...@@ -92,7 +92,7 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( WinEDA_SchematicFrame* a ...@@ -92,7 +92,7 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( WinEDA_SchematicFrame* a
{ {
wxASSERT( aParent != NULL ); wxASSERT( aParent != NULL );
m_checkReference->SetValue( aParent->GetShowSheetReference() ); m_checkReference->SetValue( aParent->GetPrintSheetReference() );
m_checkMonochrome->SetValue( aParent->GetPrintMonochrome() ); m_checkMonochrome->SetValue( aParent->GetPrintMonochrome() );
} }
...@@ -138,7 +138,7 @@ void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event ) ...@@ -138,7 +138,7 @@ void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event )
} }
parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() ); parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() );
parent->SetShowSheetReference( m_checkReference->IsChecked() ); parent->SetPrintSheetReference( m_checkReference->IsChecked() );
EndDialog( wxID_CANCEL ); EndDialog( wxID_CANCEL );
} }
...@@ -165,7 +165,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) ...@@ -165,7 +165,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
WinEDA_SchematicFrame* parent = GetParent(); WinEDA_SchematicFrame* parent = GetParent();
parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() ); parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() );
parent->SetShowSheetReference( m_checkReference->IsChecked() ); parent->SetPrintSheetReference( m_checkReference->IsChecked() );
// Pass two printout objects: for preview, and possible printing. // Pass two printout objects: for preview, and possible printing.
wxString title = _( "Preview" ); wxString title = _( "Preview" );
...@@ -194,7 +194,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event ) ...@@ -194,7 +194,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
WinEDA_SchematicFrame* parent = GetParent(); WinEDA_SchematicFrame* parent = GetParent();
parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() ); parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() );
parent->SetShowSheetReference( m_checkReference->IsChecked() ); parent->SetPrintSheetReference( m_checkReference->IsChecked() );
wxPrintDialogData printDialogData( parent->GetPageSetupData().GetPrintData() ); wxPrintDialogData printDialogData( parent->GetPageSetupData().GetPrintData() );
printDialogData.SetMaxPage( g_RootSheet->CountSheets() ); printDialogData.SetMaxPage( g_RootSheet->CountSheets() );
...@@ -333,7 +333,7 @@ void SCH_PRINTOUT::DrawPage() ...@@ -333,7 +333,7 @@ void SCH_PRINTOUT::DrawPage()
panel->m_ClipBox.SetOrigin( wxPoint( 0, 0 ) ); panel->m_ClipBox.SetOrigin( wxPoint( 0, 0 ) );
panel->m_ClipBox.SetSize( wxSize( 0x7FFFFF0, 0x7FFFFF0 ) ); panel->m_ClipBox.SetSize( wxSize( 0x7FFFFF0, 0x7FFFFF0 ) );
bool printReference = parent->GetShowSheetReference(); bool printReference = parent->GetPrintSheetReference();
if( printReference ) if( printReference )
{ {
......
...@@ -342,10 +342,6 @@ PARAM_CFG_ARRAY& WinEDA_SchematicFrame::GetProjectFileParameters( void ) ...@@ -342,10 +342,6 @@ PARAM_CFG_ARRAY& WinEDA_SchematicFrame::GetProjectFileParameters( void )
&g_DefaultTextLabelSize, &g_DefaultTextLabelSize,
DEFAULT_SIZE_TEXT, 0, DEFAULT_SIZE_TEXT, 0,
1000 ) ); 1000 ) );
m_projectFileParams.push_back( new PARAM_CFG_BOOL( wxT( "PrintMonochrome" ),
&m_printMonochrome, true ) );
m_projectFileParams.push_back( new PARAM_CFG_BOOL( wxT( "ShowSheetReferenceAndTitleBlock" ),
&m_showSheetReference, true ) );
return m_projectFileParams; return m_projectFileParams;
} }
...@@ -542,6 +538,10 @@ PARAM_CFG_ARRAY& WinEDA_SchematicFrame::GetConfigurationSettings( void ) ...@@ -542,6 +538,10 @@ PARAM_CFG_ARRAY& WinEDA_SchematicFrame::GetConfigurationSettings( void )
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorErcE" ), m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorErcE" ),
&g_LayerDescr.LayerColor[LAYER_ERC_ERR], &g_LayerDescr.LayerColor[LAYER_ERC_ERR],
RED ) ); RED ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PrintMonochrome" ),
&m_printMonochrome, true ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PrintSheetReferenceAndTitleBlock" ),
&m_printSheetReference, true ) );
return m_configSettings; return m_configSettings;
} }
......
...@@ -168,7 +168,7 @@ WinEDA_SchematicFrame::WinEDA_SchematicFrame( wxWindow* father, ...@@ -168,7 +168,7 @@ WinEDA_SchematicFrame::WinEDA_SchematicFrame( wxWindow* father,
m_previewPosition = wxDefaultPosition; m_previewPosition = wxDefaultPosition;
m_previewSize = wxDefaultSize; m_previewSize = wxDefaultSize;
m_printMonochrome = true; m_printMonochrome = true;
m_showSheetReference = true; m_printSheetReference = true;
m_HotkeysZoomAndGridList = s_Schematic_Hokeys_Descr; m_HotkeysZoomAndGridList = s_Schematic_Hokeys_Descr;
m_dlgFindReplace = NULL; m_dlgFindReplace = NULL;
m_findReplaceData = new wxFindReplaceData( wxFR_DOWN ); m_findReplaceData = new wxFindReplaceData( wxFR_DOWN );
......
/*******************************************************************/ /*****************************/
/* class_gerber_draw_item.h: definitions relatives to tracks, vias and zones */ /* class_gerber_draw_item.h */
/*******************************************************************/ /*****************************/
#ifndef CLASS_GERBER_DRAW_ITEM_H #ifndef CLASS_GERBER_DRAW_ITEM_H
#define CLASS_GERBER_DRAW_ITEM_H #define CLASS_GERBER_DRAW_ITEM_H
......
...@@ -85,7 +85,7 @@ private: ...@@ -85,7 +85,7 @@ private:
wxPoint m_printDialogPosition; wxPoint m_printDialogPosition;
wxSize m_printDialogSize; wxSize m_printDialogSize;
bool m_printMonochrome; ///< Print monochrome instead of grey scale. bool m_printMonochrome; ///< Print monochrome instead of grey scale.
bool m_showSheetReference; bool m_printSheetReference;
DIALOG_SCH_FIND* m_dlgFindReplace; DIALOG_SCH_FIND* m_dlgFindReplace;
wxPoint m_findDialogPosition; wxPoint m_findDialogPosition;
wxSize m_findDialogSize; wxSize m_findDialogSize;
...@@ -343,8 +343,8 @@ public: ...@@ -343,8 +343,8 @@ public:
bool GetPrintMonochrome() { return m_printMonochrome; } bool GetPrintMonochrome() { return m_printMonochrome; }
void SetPrintMonochrome( bool aMonochrome ) { m_printMonochrome = aMonochrome; } void SetPrintMonochrome( bool aMonochrome ) { m_printMonochrome = aMonochrome; }
bool GetShowSheetReference() { return m_showSheetReference; } bool GetPrintSheetReference() { return m_printSheetReference; }
void SetShowSheetReference( bool aShow ) { m_showSheetReference = aShow; } void SetPrintSheetReference( bool aShow ) { m_printSheetReference = aShow; }
void SVG_Print( wxCommandEvent& event ); void SVG_Print( wxCommandEvent& event );
// Plot functions: // Plot functions:
......
...@@ -41,8 +41,8 @@ set(PCBNEW_DIALOGS ...@@ -41,8 +41,8 @@ set(PCBNEW_DIALOGS
dialogs/dialog_edit_module_text_base.cpp dialogs/dialog_edit_module_text_base.cpp
dialogs/dialog_exchange_modules_base.cpp dialogs/dialog_exchange_modules_base.cpp
dialogs/dialog_export_3Dfiles_base.cpp dialogs/dialog_export_3Dfiles_base.cpp
dialog_freeroute_exchange.cpp dialogs/dialog_freeroute_exchange.cpp
dialog_freeroute_exchange_base.cpp dialogs/dialog_freeroute_exchange_base.cpp
dialogs/dialog_gendrill.cpp dialogs/dialog_gendrill.cpp
dialogs/dialog_gendrill_base.cpp dialogs/dialog_gendrill_base.cpp
dialogs/dialog_general_options.cpp dialogs/dialog_general_options.cpp
...@@ -232,17 +232,17 @@ endif(APPLE) ...@@ -232,17 +232,17 @@ endif(APPLE)
add_custom_command( add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help_html.h OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help_html.h
COMMAND ${CMAKE_COMMAND} COMMAND ${CMAKE_COMMAND}
-DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help.html -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html
-DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help_html.h -DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h
-P ${CMAKE_MODULE_PATH}/Html2C.cmake -P ${CMAKE_MODULE_PATH}/Html2C.cmake
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help.html DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html
COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help_html.h COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h
from ${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help.html" from ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html"
) )
set_source_files_properties( dialog_freeroute_exchange.cpp set_source_files_properties( dialogs/dialog_freeroute_exchange.cpp
PROPERTIES PROPERTIES
OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help_html.h OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h
) )
### ###
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "common.h" #include "common.h"
#include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "pcbnew.h" #include "pcbnew.h"
#include "wxPcbStruct.h" #include "wxPcbStruct.h"
...@@ -71,30 +72,30 @@ void DIALOG_FREEROUTE::OnHelpButtonClick( wxCommandEvent& event ) ...@@ -71,30 +72,30 @@ void DIALOG_FREEROUTE::OnHelpButtonClick( wxCommandEvent& event )
help_Dlg.ShowModal(); help_Dlg.ShowModal();
} }
/*! /* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CREATE_EXPORT_DSN_FILE
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CREATE_EXPORT_DSN_FILE
*/ */
void DIALOG_FREEROUTE::OnExportButtonClick( wxCommandEvent& event ) void DIALOG_FREEROUTE::OnExportButtonClick( wxCommandEvent& event )
{ {
m_Parent->ExportToSpecctra( event ); m_Parent->ExportToSpecctra( event );
} }
/*! /* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_IMPORT_FREEROUTE_DSN_FILE
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_IMPORT_FREEROUTE_DSN_FILE
*/ */
void DIALOG_FREEROUTE::OnImportButtonClick( wxCommandEvent& event ) void DIALOG_FREEROUTE::OnImportButtonClick( wxCommandEvent& event )
{ {
m_Parent->ImportSpecctraSession( event ); m_Parent->ImportSpecctraSession( event );
/* Connectivity inf must be rebuild.
* because for large board it can take some time, this is made only on demand
*/
if( IsOK( this, _("Do you want to rebuild connectivity data ?" ) ) )
m_Parent->Compile_Ratsnest( NULL, true );
} }
/*! /* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RUN_FREEROUTE
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RUN_FREEROUTE
*/ */
void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event ) void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event )
{ {
wxString FullFileName = FindKicadFile( wxT( "freeroute.jnlp" ) ); wxString FullFileName = FindKicadFile( wxT( "freeroute.jnlp" ) );
...@@ -115,10 +116,8 @@ void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event ) ...@@ -115,10 +116,8 @@ void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event )
} }
/*! /* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON
*/ */
void DIALOG_FREEROUTE::OnVisitButtonClick( wxCommandEvent& event ) void DIALOG_FREEROUTE::OnVisitButtonClick( wxCommandEvent& event )
{ {
wxString command = m_FreerouteURLName->GetValue(); wxString command = m_FreerouteURLName->GetValue();
...@@ -127,10 +126,8 @@ void DIALOG_FREEROUTE::OnVisitButtonClick( wxCommandEvent& event ) ...@@ -127,10 +126,8 @@ void DIALOG_FREEROUTE::OnVisitButtonClick( wxCommandEvent& event )
} }
/*! /* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
*/ */
void DIALOG_FREEROUTE::OnCancelButtonClick( wxCommandEvent& event ) void DIALOG_FREEROUTE::OnCancelButtonClick( wxCommandEvent& event )
{ {
EndModal(wxID_CANCEL); EndModal(wxID_CANCEL);
...@@ -149,10 +146,8 @@ void DIALOG_FREEROUTE::OnOKButtonClick( wxCommandEvent& event ) ...@@ -149,10 +146,8 @@ void DIALOG_FREEROUTE::OnOKButtonClick( wxCommandEvent& event )
} }
/*! /* wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXT_EDIT_FR_URL
* wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXT_EDIT_FR_URL
*/ */
void DIALOG_FREEROUTE::OnTextEditFrUrlUpdated( wxCommandEvent& event ) void DIALOG_FREEROUTE::OnTextEditFrUrlUpdated( wxCommandEvent& event )
{ {
m_FreeRouteSetupChanged = true; m_FreeRouteSetupChanged = true;
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
// Name: dialog_freeroute_exchange.h // Name: dialog_freeroute_exchange.h
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 14/03/2008 09:19:27
#ifndef _DIALOG_FREEROUTE_EXCHANGE_H_ #ifndef _DIALOG_FREEROUTE_EXCHANGE_H_
#define _DIALOG_FREEROUTE_EXCHANGE_H_ #define _DIALOG_FREEROUTE_EXCHANGE_H_
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
/** /**
* @info for EXCELLON format, see: * @info for EXCELLON format, see:
* http://www.excellon.com/applicationengineering/manuals/program.htm * http://www.excellon.com/manuals/program.htm
* and the CNC-7 manual. * and the CNC-7 manual.
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment