Commit df344195 authored by Wayne Stambaugh's avatar Wayne Stambaugh

Schematic hierarchy path object improvements.

* Use Boost pointer container for sheet hierarchy object.
* Add test for modification in sheet hierarchy list object.
* Add method to clear modification flag in sheet hierarchy list object.
* Improve Doxygen comments for sheet hierarchy list object.
* Remove redundant definitions in prototypes header file.
parent 495f2a04
......@@ -2,29 +2,19 @@
#ifndef __PROTOS_H__
#define __PROTOS_H__
#include "block_commande.h"
#include "colors.h"
#include "sch_sheet_path.h"
#include <wx/wx.h>
class EDA_ITEM;
class EDA_DRAW_PANEL;
class EDA_DRAW_FRAME;
class SCH_EDIT_FRAME;
class LIB_EDIT_FRAME;
class CMP_LIBRARY;
class LIB_COMPONENT;
class LIB_DRAW_ITEM;
class SCH_COMPONENT;
class SCH_SCREEN;
class SCH_ITEM;
class SCH_SHEET_PIN;
class PLOTTER;
class SCH_SHEET;
class LIB_PIN;
class LABEL_OBJECT;
class NETLIST_OBJECT;
......@@ -57,6 +47,7 @@ void SnapLibItemPoint( int OrigX,
int* ClosestX,
int* ClosestY,
SCH_COMPONENT* DrawLibItem );
bool LibItemInBox( int x1, int y1, int x2, int y2, SCH_COMPONENT* DrawLibItem );
/************/
......@@ -203,9 +194,7 @@ CMP_LIBRARY* SelectLibraryFromList( EDA_DRAW_FRAME* frame );
* 0 if canceled order
* Place the name of the selected component list in BufName
*/
int GetNameOfPartToLoad( EDA_DRAW_FRAME* frame,
CMP_LIBRARY* Lib,
wxString& BufName );
int GetNameOfPartToLoad( EDA_DRAW_FRAME* frame, CMP_LIBRARY* Lib, wxString& BufName );
/**************/
/* LIBARCH.CPP */
......
......@@ -530,4 +530,7 @@ private:
virtual EDA_ITEM* doClone() const;
};
typedef boost::ptr_vector< SCH_SHEET > SCH_SHEETS;
#endif /* CLASS_DRAWSHEET_H */
This diff is collapsed.
This diff is collapsed.
......@@ -346,23 +346,12 @@ void SCH_EDIT_FRAME::CreateScreens()
void SCH_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
{
SCH_SHEET_PATH* sheet;
if( m_LibeditFrame ) // Can close component editor ?
{
if( !m_LibeditFrame->Close() )
if( m_LibeditFrame && !m_LibeditFrame->Close() ) // Can close component editor?
return;
}
SCH_SHEET_LIST SheetList;
for( sheet = SheetList.GetFirst(); sheet != NULL; sheet = SheetList.GetNext() )
{
if( sheet->LastScreen() && sheet->LastScreen()->IsModify() )
break;
}
if( sheet )
if( SheetList.IsModified() )
{
wxMessageDialog dialog( this,
_( "Schematic modified, Save before exit ?" ),
......@@ -385,15 +374,7 @@ void SCH_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
}
}
for( sheet = SheetList.GetFirst();
sheet != NULL;
sheet = SheetList.GetNext() )
{
if( sheet->LastScreen() )
{
sheet->LastScreen()->ClrModify();
}
}
SheetList.ClearModifyStatus();
if( !g_RootSheet->GetScreen()->GetFileName().IsEmpty()
&& (g_RootSheet->GetScreen()->GetDrawItems() != NULL) )
......
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