Cleanup unused and redundant stuff.
This commit is contained in:
parent
e2ea9b772a
commit
37cfa3fed9
|
@ -171,14 +171,6 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( SCH_EDIT_FRAME* aParent
|
|||
|
||||
DIALOG_PRINT_USING_PRINTER::~DIALOG_PRINT_USING_PRINTER()
|
||||
{
|
||||
SCH_EDIT_FRAME* parent = GetParent();
|
||||
|
||||
if( !IsIconized() )
|
||||
{
|
||||
parent->SetPrintDialogPosition( GetPosition() );
|
||||
parent->SetPrintDialogSize( GetSize() );
|
||||
}
|
||||
|
||||
GetPrintOptions();
|
||||
}
|
||||
|
||||
|
|
|
@ -415,39 +415,9 @@ void SCH_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
|
|||
aCfg->Read( AutoplaceAlignEntry, &m_autoplaceAlign, false );
|
||||
aCfg->Read( FootprintPreviewEntry, &m_footprintPreview, false );
|
||||
|
||||
// Load print preview window session settings.
|
||||
aCfg->Read( PreviewFramePositionXEntry, &tmp, -1 );
|
||||
m_previewPosition.x = (int) tmp;
|
||||
aCfg->Read( PreviewFramePositionYEntry, &tmp, -1 );
|
||||
m_previewPosition.y = (int) tmp;
|
||||
aCfg->Read( PreviewFrameWidthEntry, &tmp, -1 );
|
||||
m_previewSize.SetWidth( (int) tmp );
|
||||
aCfg->Read( PreviewFrameHeightEntry, &tmp, -1 );
|
||||
m_previewSize.SetHeight( (int) tmp );
|
||||
|
||||
// Load print dialog session settings.
|
||||
aCfg->Read( PrintDialogPositionXEntry, &tmp, -1 );
|
||||
m_printDialogPosition.x = (int) tmp;
|
||||
aCfg->Read( PrintDialogPositionYEntry, &tmp, -1 );
|
||||
m_printDialogPosition.y = (int) tmp;
|
||||
aCfg->Read( PrintDialogWidthEntry, &tmp, -1 );
|
||||
m_printDialogSize.SetWidth( (int) tmp );
|
||||
aCfg->Read( PrintDialogHeightEntry, &tmp, -1 );
|
||||
m_printDialogSize.SetHeight( (int) tmp );
|
||||
|
||||
// Load netlists options:
|
||||
aCfg->Read( SimulatorCommandEntry, &m_simulatorCommand );
|
||||
|
||||
// Load find dialog session setting.
|
||||
aCfg->Read( FindDialogPositionXEntry, &tmp, -1 );
|
||||
m_findDialogPosition.x = (int) tmp;
|
||||
aCfg->Read( FindDialogPositionYEntry, &tmp, -1 );
|
||||
m_findDialogPosition.y = (int) tmp;
|
||||
aCfg->Read( FindDialogWidthEntry, &tmp, -1 );
|
||||
m_findDialogSize.SetWidth( (int) tmp );
|
||||
aCfg->Read( FindDialogHeightEntry, &tmp, -1 );
|
||||
m_findDialogSize.SetHeight( (int) tmp );
|
||||
|
||||
wxASSERT_MSG( m_findReplaceData,
|
||||
wxT( "Find dialog data settings object not created. Bad programmer!" ) );
|
||||
|
||||
|
@ -514,26 +484,10 @@ void SCH_EDIT_FRAME::SaveSettings( wxConfigBase* aCfg )
|
|||
aCfg->Write( AutoplaceAlignEntry, m_autoplaceAlign );
|
||||
aCfg->Write( FootprintPreviewEntry, m_footprintPreview );
|
||||
|
||||
// Save print preview window session settings.
|
||||
aCfg->Write( PreviewFramePositionXEntry, m_previewPosition.x );
|
||||
aCfg->Write( PreviewFramePositionYEntry, m_previewPosition.y );
|
||||
aCfg->Write( PreviewFrameWidthEntry, m_previewSize.GetWidth() );
|
||||
aCfg->Write( PreviewFrameHeightEntry, m_previewSize.GetHeight() );
|
||||
|
||||
// Save print dialog session settings.
|
||||
aCfg->Write( PrintDialogPositionXEntry, m_printDialogPosition.x );
|
||||
aCfg->Write( PrintDialogPositionYEntry, m_printDialogPosition.y );
|
||||
aCfg->Write( PrintDialogWidthEntry, m_printDialogSize.GetWidth() );
|
||||
aCfg->Write( PrintDialogHeightEntry, m_printDialogSize.GetHeight() );
|
||||
|
||||
// Save netlists options:
|
||||
aCfg->Write( SimulatorCommandEntry, m_simulatorCommand );
|
||||
|
||||
// Save find dialog session setting.
|
||||
aCfg->Write( FindDialogPositionXEntry, m_findDialogPosition.x );
|
||||
aCfg->Write( FindDialogPositionYEntry, m_findDialogPosition.y );
|
||||
aCfg->Write( FindDialogWidthEntry, m_findDialogSize.GetWidth() );
|
||||
aCfg->Write( FindDialogHeightEntry, m_findDialogSize.GetHeight() );
|
||||
wxASSERT_MSG( m_findReplaceData,
|
||||
wxT( "Find dialog data settings object not created. Bad programmer!" ) );
|
||||
aCfg->Write( FindReplaceFlagsEntry,
|
||||
|
|
|
@ -372,8 +372,6 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
|||
m_DefaultSchematicFileName = NAMELESS_PROJECT;
|
||||
m_DefaultSchematicFileName += wxT( ".sch" );
|
||||
m_showAllPins = false;
|
||||
m_previewPosition = wxDefaultPosition;
|
||||
m_previewSize = wxDefaultSize;
|
||||
m_printMonochrome = true;
|
||||
m_printSheetReference = true;
|
||||
SetShowPageLimits( true );
|
||||
|
@ -659,8 +657,6 @@ void SCH_EDIT_FRAME::OnCloseWindow( wxCloseEvent& aEvent )
|
|||
// Close the find dialog and preserve it's setting if it is displayed.
|
||||
if( m_dlgFindReplace )
|
||||
{
|
||||
m_findDialogPosition = m_dlgFindReplace->GetPosition();
|
||||
m_findDialogSize = m_dlgFindReplace->GetSize();
|
||||
m_findStringHistoryList = m_dlgFindReplace->GetFindEntries();
|
||||
m_replaceStringHistoryList = m_dlgFindReplace->GetReplaceEntries();
|
||||
m_dlgFindReplace->Destroy();
|
||||
|
@ -947,26 +943,13 @@ void SCH_EDIT_FRAME::OnFindItems( wxCommandEvent& aEvent )
|
|||
m_dlgFindReplace = NULL;
|
||||
}
|
||||
|
||||
// Verify the find dialog is not drawn off the visible display area in case the
|
||||
// display configuration has changed since the last time the dialog position was
|
||||
// saved.
|
||||
wxRect displayRect = wxDisplay().GetGeometry();
|
||||
wxRect dialogRect = wxRect( m_findDialogPosition, m_findDialogSize );
|
||||
|
||||
wxPoint position = m_findDialogPosition;
|
||||
|
||||
if( !displayRect.Contains( dialogRect ) )
|
||||
{
|
||||
position = wxDefaultPosition;
|
||||
}
|
||||
|
||||
int style = 0;
|
||||
|
||||
if( aEvent.GetId() == wxID_REPLACE )
|
||||
style = wxFR_REPLACEDIALOG;
|
||||
|
||||
m_dlgFindReplace = new DIALOG_SCH_FIND( this, m_findReplaceData, m_findReplaceStatus,
|
||||
position, m_findDialogSize, style );
|
||||
wxDefaultPosition, wxDefaultSize, style );
|
||||
|
||||
m_dlgFindReplace->SetFindEntries( m_findStringHistoryList );
|
||||
m_dlgFindReplace->SetReplaceEntries( m_replaceStringHistoryList );
|
||||
|
@ -982,8 +965,6 @@ void SCH_EDIT_FRAME::OnFindDialogClose( wxFindDialogEvent& event )
|
|||
|
||||
if( m_dlgFindReplace )
|
||||
{
|
||||
m_findDialogPosition = m_dlgFindReplace->GetPosition();
|
||||
m_findDialogSize = m_dlgFindReplace->GetSize();
|
||||
m_findStringHistoryList = m_dlgFindReplace->GetFindEntries();
|
||||
m_replaceStringHistoryList = m_dlgFindReplace->GetReplaceEntries();
|
||||
m_dlgFindReplace->Destroy();
|
||||
|
|
|
@ -126,15 +126,9 @@ private:
|
|||
wxPageSetupDialogData m_pageSetupData;
|
||||
wxFindReplaceData* m_findReplaceData;
|
||||
wxString* m_findReplaceStatus;
|
||||
wxPoint m_previewPosition;
|
||||
wxSize m_previewSize;
|
||||
wxPoint m_printDialogPosition;
|
||||
wxSize m_printDialogSize;
|
||||
bool m_printMonochrome; ///< Print monochrome instead of grey scale.
|
||||
bool m_printSheetReference;
|
||||
DIALOG_SCH_FIND* m_dlgFindReplace;
|
||||
wxPoint m_findDialogPosition;
|
||||
wxSize m_findDialogSize;
|
||||
wxArrayString m_findStringHistoryList;
|
||||
wxArrayString m_replaceStringHistoryList;
|
||||
BLOCK_SELECTOR m_blockItems; ///< List of selected items.
|
||||
|
@ -172,11 +166,6 @@ private:
|
|||
/// Use netcodes (net number) as net names when generating spice net lists.
|
||||
bool m_spiceAjustPassiveValues;
|
||||
|
||||
/* these are PROJECT specific, not schematic editor specific
|
||||
wxString m_userLibraryPath;
|
||||
wxArrayString m_componentLibFiles;
|
||||
*/
|
||||
|
||||
static PINSHEETLABEL_SHAPE m_lastSheetPinType; ///< Last sheet pin type.
|
||||
static wxSize m_lastSheetPinTextSize; ///< Last sheet pin text size.
|
||||
static wxPoint m_lastSheetPinPosition; ///< Last sheet pin position.
|
||||
|
@ -264,7 +253,7 @@ public:
|
|||
void Process_Config( wxCommandEvent& event );
|
||||
void OnSelectTool( wxCommandEvent& aEvent );
|
||||
|
||||
bool GeneralControl( wxDC* aDC, const wxPoint& aPosition, EDA_KEY aHotKey = 0 ) override;
|
||||
bool GeneralControl( wxDC* aDC, const wxPoint& aPosition, EDA_KEY aHotKey ) override;
|
||||
|
||||
/**
|
||||
* Return the project file parameter list for Eeschema.
|
||||
|
@ -350,7 +339,7 @@ public:
|
|||
///> @copydoc EDA_DRAW_FRAME::GetHotKeyDescription()
|
||||
EDA_HOTKEY* GetHotKeyDescription( int aCommand ) const override;
|
||||
|
||||
bool OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, EDA_ITEM* aItem = NULL ) override;
|
||||
bool OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, EDA_ITEM* aItem ) override;
|
||||
|
||||
/**
|
||||
* Must be called after a schematic change in order to set the "modify" flag of the
|
||||
|
@ -360,8 +349,6 @@ public:
|
|||
|
||||
virtual wxString GetScreenDesc() const override;
|
||||
|
||||
void InstallConfigFrame( wxCommandEvent& event );
|
||||
|
||||
/**
|
||||
* Execute a remote command send by Pcbnew via a socket,
|
||||
* port KICAD_SCH_PORT_SERVICE_NUMBER (currently 4243)
|
||||
|
@ -676,21 +663,6 @@ public:
|
|||
|
||||
wxPageSetupDialogData& GetPageSetupData() { return m_pageSetupData; }
|
||||
|
||||
void SetPreviewPosition( const wxPoint& aPoint ) { m_previewPosition = aPoint; }
|
||||
void SetPreviewSize( const wxSize& aSize ) { m_previewSize = aSize; }
|
||||
const wxPoint& GetPreviewPosition() { return m_previewPosition; }
|
||||
const wxSize& GetPreviewSize() { return m_previewSize; }
|
||||
|
||||
void SetPrintDialogPosition( const wxPoint& aPoint )
|
||||
{
|
||||
m_printDialogPosition = aPoint;
|
||||
}
|
||||
|
||||
|
||||
void SetPrintDialogSize( const wxSize& aSize ) { m_printDialogSize = aSize; }
|
||||
const wxPoint& GetPrintDialogPosition() { return m_printDialogPosition; }
|
||||
const wxSize& GetPrintDialogSize() { return m_printDialogSize; }
|
||||
|
||||
bool GetPrintMonochrome() { return m_printMonochrome; }
|
||||
void SetPrintMonochrome( bool aMonochrome ) { m_printMonochrome = aMonochrome; }
|
||||
bool GetPrintSheetReference() { return m_printSheetReference; }
|
||||
|
@ -1018,12 +990,6 @@ private:
|
|||
void DeleteCurrentSegment( wxDC* DC );
|
||||
void DeleteConnection( bool DeleteFullConnection );
|
||||
|
||||
// graphic lines
|
||||
void Edge( DRAWSEGMENT* Segment, wxDC* DC );
|
||||
void SetNewWidth( DRAWSEGMENT* DrawSegm, wxDC* DC );
|
||||
void Layer( DRAWSEGMENT* Segment, wxDC* DC );
|
||||
DRAWSEGMENT* Begin_Edge( DRAWSEGMENT* Segment, wxDC* DC );
|
||||
|
||||
// Images:
|
||||
SCH_BITMAP* CreateNewImage( wxDC* aDC );
|
||||
void MoveImage( SCH_BITMAP* aItem, wxDC* aDC );
|
||||
|
@ -1053,7 +1019,7 @@ private:
|
|||
* @param aSheet the hierarchical sheet to rotate
|
||||
* @param aRotCCW = true to rotate CCW, false to rotate CW
|
||||
*/
|
||||
void RotateHierarchicalSheet( SCH_SHEET* aSheet, bool aRotCCW );
|
||||
void RotateHierarchicalSheet( SCH_SHEET* aSheet, bool aRotCCW );
|
||||
|
||||
/**
|
||||
* Mirror a hierarchical sheet.
|
||||
|
@ -1066,10 +1032,6 @@ private:
|
|||
*/
|
||||
void MirrorSheet( SCH_SHEET* aSheet, bool aFromXaxis );
|
||||
|
||||
/// Loads the cache library associated to the aFileName
|
||||
bool LoadCacheLibrary( const wxString& aFileName );
|
||||
|
||||
private:
|
||||
/**
|
||||
* Function EditLine
|
||||
* displays the dialog for editing the parameters of \a aLine.
|
||||
|
|
Loading…
Reference in New Issue