minor cleanup. minor enhancements. Finish file housekeeping. add Bug 682586 fix from Mark van Doesburg.

This commit is contained in:
jean-pierre charras 2010-11-29 16:05:01 +01:00
parent 8e0937e6a2
commit 67d98658bc
16 changed files with 513 additions and 525 deletions

View File

@ -741,13 +741,13 @@ void PARAM_CFG_LIBNAME_LIST::SaveParam( wxConfigBase* aConfig )
wxArrayString* libname_list = m_Pt_param;
unsigned indexlib = 0;
wxString cle_config;
wxString configkey;
for( ; indexlib < libname_list->GetCount(); indexlib++ )
{
cle_config = m_Ident;
configkey = m_Ident;
// We use indexlib+1 because first lib name is LibName1
cle_config << (indexlib + 1);
aConfig->Write( cle_config, libname_list->Item( indexlib ) );
configkey << (indexlib + 1);
aConfig->Write( configkey, libname_list->Item( indexlib ) );
}
}

View File

@ -140,7 +140,7 @@ found in the default search paths." ),
BOOST_FOREACH( COMPONENT& component, m_components )
{
m_ListCmp->SetSelection( ii, true );
m_ListCmp->SetSelection( ii++, true );
if( !component.m_Module.IsEmpty() )
continue;
@ -169,7 +169,5 @@ any of the project footprint libraries." ),
this );
}
}
ii += 1;
}
}

View File

@ -355,8 +355,6 @@ void WinEDA_CvpcbFrame::ToFirstNA( wxCommandEvent& event )
ii++;
}
wxBell();
m_ListCmp->SetSelection( selection );
}
@ -384,8 +382,6 @@ void WinEDA_CvpcbFrame::ToPreviousNA( wxCommandEvent& event )
}
ii--;
}
wxBell();
m_ListCmp->SetSelection( selection );
}

View File

@ -92,7 +92,7 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( WinEDA_SchematicFrame* a
{
wxASSERT( aParent != NULL );
m_checkReference->SetValue( aParent->GetShowSheetReference() );
m_checkReference->SetValue( aParent->GetPrintSheetReference() );
m_checkMonochrome->SetValue( aParent->GetPrintMonochrome() );
}
@ -138,7 +138,7 @@ void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event )
}
parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() );
parent->SetShowSheetReference( m_checkReference->IsChecked() );
parent->SetPrintSheetReference( m_checkReference->IsChecked() );
EndDialog( wxID_CANCEL );
}
@ -165,7 +165,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
WinEDA_SchematicFrame* parent = GetParent();
parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() );
parent->SetShowSheetReference( m_checkReference->IsChecked() );
parent->SetPrintSheetReference( m_checkReference->IsChecked() );
// Pass two printout objects: for preview, and possible printing.
wxString title = _( "Preview" );
@ -194,7 +194,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
WinEDA_SchematicFrame* parent = GetParent();
parent->SetPrintMonochrome( m_checkMonochrome->IsChecked() );
parent->SetShowSheetReference( m_checkReference->IsChecked() );
parent->SetPrintSheetReference( m_checkReference->IsChecked() );
wxPrintDialogData printDialogData( parent->GetPageSetupData().GetPrintData() );
printDialogData.SetMaxPage( g_RootSheet->CountSheets() );
@ -333,7 +333,7 @@ void SCH_PRINTOUT::DrawPage()
panel->m_ClipBox.SetOrigin( wxPoint( 0, 0 ) );
panel->m_ClipBox.SetSize( wxSize( 0x7FFFFF0, 0x7FFFFF0 ) );
bool printReference = parent->GetShowSheetReference();
bool printReference = parent->GetPrintSheetReference();
if( printReference )
{

View File

@ -342,10 +342,6 @@ PARAM_CFG_ARRAY& WinEDA_SchematicFrame::GetProjectFileParameters( void )
&g_DefaultTextLabelSize,
DEFAULT_SIZE_TEXT, 0,
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;
}
@ -542,6 +538,10 @@ PARAM_CFG_ARRAY& WinEDA_SchematicFrame::GetConfigurationSettings( void )
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorErcE" ),
&g_LayerDescr.LayerColor[LAYER_ERC_ERR],
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;
}

View File

@ -168,7 +168,7 @@ WinEDA_SchematicFrame::WinEDA_SchematicFrame( wxWindow* father,
m_previewPosition = wxDefaultPosition;
m_previewSize = wxDefaultSize;
m_printMonochrome = true;
m_showSheetReference = true;
m_printSheetReference = true;
m_HotkeysZoomAndGridList = s_Schematic_Hokeys_Descr;
m_dlgFindReplace = NULL;
m_findReplaceData = new wxFindReplaceData( wxFR_DOWN );

View File

@ -1,6 +1,6 @@
/*******************************************************************/
/* class_gerber_draw_item.h: definitions relatives to tracks, vias and zones */
/*******************************************************************/
/*****************************/
/* class_gerber_draw_item.h */
/*****************************/
#ifndef CLASS_GERBER_DRAW_ITEM_H
#define CLASS_GERBER_DRAW_ITEM_H

View File

@ -85,7 +85,7 @@ private:
wxPoint m_printDialogPosition;
wxSize m_printDialogSize;
bool m_printMonochrome; ///< Print monochrome instead of grey scale.
bool m_showSheetReference;
bool m_printSheetReference;
DIALOG_SCH_FIND* m_dlgFindReplace;
wxPoint m_findDialogPosition;
wxSize m_findDialogSize;
@ -343,8 +343,8 @@ public:
bool GetPrintMonochrome() { return m_printMonochrome; }
void SetPrintMonochrome( bool aMonochrome ) { m_printMonochrome = aMonochrome; }
bool GetShowSheetReference() { return m_showSheetReference; }
void SetShowSheetReference( bool aShow ) { m_showSheetReference = aShow; }
bool GetPrintSheetReference() { return m_printSheetReference; }
void SetPrintSheetReference( bool aShow ) { m_printSheetReference = aShow; }
void SVG_Print( wxCommandEvent& event );
// Plot functions:

View File

@ -41,8 +41,8 @@ set(PCBNEW_DIALOGS
dialogs/dialog_edit_module_text_base.cpp
dialogs/dialog_exchange_modules_base.cpp
dialogs/dialog_export_3Dfiles_base.cpp
dialog_freeroute_exchange.cpp
dialog_freeroute_exchange_base.cpp
dialogs/dialog_freeroute_exchange.cpp
dialogs/dialog_freeroute_exchange_base.cpp
dialogs/dialog_gendrill.cpp
dialogs/dialog_gendrill_base.cpp
dialogs/dialog_general_options.cpp
@ -232,17 +232,17 @@ endif(APPLE)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help_html.h
COMMAND ${CMAKE_COMMAND}
-DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help.html
-DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help_html.h
-DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help.html
-DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_freeroute_exchange_help_html.h
-P ${CMAKE_MODULE_PATH}/Html2C.cmake
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help.html
COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help_html.h
from ${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}/dialogs/dialog_freeroute_exchange_help_html.h
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
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
)
###

View File

@ -5,6 +5,7 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
#include "confirm.h"
#include "gestfich.h"
#include "pcbnew.h"
#include "wxPcbStruct.h"
@ -71,30 +72,30 @@ void DIALOG_FREEROUTE::OnHelpButtonClick( wxCommandEvent& event )
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 )
{
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 )
{
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 )
{
wxString FullFileName = FindKicadFile( wxT( "freeroute.jnlp" ) );
@ -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 )
{
wxString command = m_FreerouteURLName->GetValue();
@ -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 )
{
EndModal(wxID_CANCEL);
@ -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 )
{
m_FreeRouteSetupChanged = true;

View File

@ -2,7 +2,6 @@
// Name: dialog_freeroute_exchange.h
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 14/03/2008 09:19:27
#ifndef _DIALOG_FREEROUTE_EXCHANGE_H_
#define _DIALOG_FREEROUTE_EXCHANGE_H_

View File

@ -31,7 +31,7 @@
/**
* @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.
*/