EESchema remove global variable and fix text object change type undo/redo.
* Move undo item copy global variable into schematic editor frame object member variable. * Add helper methods for accessing the undo item copy member variable. * Fix undetected bug when changing a text type. * Added an exchange command to the undo/redo base class for handling undoing a changed item type which cannot be undone by swapping out the variables. * Revert change to common/hotkeys_basic.cpp that broke hot key behavior. * Lots of coding policy changes while making the changes above.
This commit is contained in:
parent
fb47536123
commit
df8f7d1ee0
|
@ -31,7 +31,7 @@
|
||||||
#include "class_undoredo_container.h"
|
#include "class_undoredo_container.h"
|
||||||
|
|
||||||
|
|
||||||
ITEM_PICKER::ITEM_PICKER( EDA_ITEM* aItem, UndoRedoOpType aUndoRedoStatus )
|
ITEM_PICKER::ITEM_PICKER( EDA_ITEM* aItem, UNDO_REDO_T aUndoRedoStatus )
|
||||||
{
|
{
|
||||||
m_UndoRedoStatus = aUndoRedoStatus;
|
m_UndoRedoStatus = aUndoRedoStatus;
|
||||||
m_PickedItem = aItem;
|
m_PickedItem = aItem;
|
||||||
|
@ -134,6 +134,7 @@ void PICKED_ITEMS_LIST::ClearListAndDeleteItems()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UR_CHANGED:
|
case UR_CHANGED:
|
||||||
|
case UR_EXCHANGE_T:
|
||||||
delete wrapper.m_Link; // the picker is owner of this item
|
delete wrapper.m_Link; // the picker is owner of this item
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -149,12 +150,8 @@ void PICKED_ITEMS_LIST::ClearListAndDeleteItems()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
wxFAIL_MSG( wxString::Format( wxT( "Cannot clear unknown undo/redo command %d" ),
|
||||||
wxString msg;
|
wrapper.m_UndoRedoStatus ) );
|
||||||
msg.Printf( wxT( "ClearUndoORRedoList() error: unknown command type %d" ),
|
|
||||||
wrapper.m_UndoRedoStatus );
|
|
||||||
wxMessageBox( msg );
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -190,7 +187,7 @@ EDA_ITEM* PICKED_ITEMS_LIST::GetPickedItemLink( unsigned int aIdx )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
UndoRedoOpType PICKED_ITEMS_LIST::GetPickedItemStatus( unsigned int aIdx )
|
UNDO_REDO_T PICKED_ITEMS_LIST::GetPickedItemStatus( unsigned int aIdx )
|
||||||
{
|
{
|
||||||
if( aIdx < m_ItemsList.size() )
|
if( aIdx < m_ItemsList.size() )
|
||||||
return m_ItemsList[aIdx].m_UndoRedoStatus;
|
return m_ItemsList[aIdx].m_UndoRedoStatus;
|
||||||
|
@ -232,7 +229,7 @@ bool PICKED_ITEMS_LIST::SetPickedItemLink( EDA_ITEM* aLink, unsigned aIdx )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool PICKED_ITEMS_LIST::SetPickedItem( EDA_ITEM* aItem, UndoRedoOpType aStatus, unsigned aIdx )
|
bool PICKED_ITEMS_LIST::SetPickedItem( EDA_ITEM* aItem, UNDO_REDO_T aStatus, unsigned aIdx )
|
||||||
{
|
{
|
||||||
if( aIdx < m_ItemsList.size() )
|
if( aIdx < m_ItemsList.size() )
|
||||||
{
|
{
|
||||||
|
@ -245,7 +242,7 @@ bool PICKED_ITEMS_LIST::SetPickedItem( EDA_ITEM* aItem, UndoRedoOpType aStatus,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool PICKED_ITEMS_LIST::SetPickedItemStatus( UndoRedoOpType aStatus, unsigned aIdx )
|
bool PICKED_ITEMS_LIST::SetPickedItemStatus( UNDO_REDO_T aStatus, unsigned aIdx )
|
||||||
{
|
{
|
||||||
if( aIdx < m_ItemsList.size() )
|
if( aIdx < m_ItemsList.size() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -189,8 +189,12 @@ wxString AddHotkeyName( const wxString& aText, Ki_HotkeyInfo** aList,
|
||||||
keyname = ReturnKeyNameFromCommandId( aList, aCommandId );
|
keyname = ReturnKeyNameFromCommandId( aList, aCommandId );
|
||||||
|
|
||||||
if( !keyname.IsEmpty() )
|
if( !keyname.IsEmpty() )
|
||||||
|
{
|
||||||
|
if( aIsShortCut )
|
||||||
msg << wxT( "\t" ) << keyname;
|
msg << wxT( "\t" ) << keyname;
|
||||||
|
else
|
||||||
|
msg << wxT( " <" ) << keyname << wxT( ">" );
|
||||||
|
}
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,10 +223,12 @@ wxString AddHotkeyName( const wxString& aText,
|
||||||
{
|
{
|
||||||
List = aDescList->m_HK_InfoList;
|
List = aDescList->m_HK_InfoList;
|
||||||
keyname = ReturnKeyNameFromCommandId( List, aCommandId );
|
keyname = ReturnKeyNameFromCommandId( List, aCommandId );
|
||||||
|
|
||||||
if( !keyname.IsEmpty() )
|
if( !keyname.IsEmpty() )
|
||||||
{
|
{
|
||||||
|
if( aIsShortCut )
|
||||||
msg << wxT( "\t" ) << keyname;
|
msg << wxT( "\t" ) << keyname;
|
||||||
|
else
|
||||||
|
msg << wxT( " <" ) << keyname << wxT( ">" );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,6 +116,12 @@ bool SCH_ITEM::IsConnected( const wxPoint& aPosition ) const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SCH_ITEM::SwapData( SCH_ITEM* aItem )
|
||||||
|
{
|
||||||
|
wxFAIL_MSG( wxT( "SwapData() method not implemented for class " ) + GetClass() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool SCH_ITEM::operator < ( const SCH_ITEM& aItem ) const
|
bool SCH_ITEM::operator < ( const SCH_ITEM& aItem ) const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( false, this->Type() < aItem.Type(),
|
wxCHECK_MSG( false, this->Type() < aItem.Type(),
|
||||||
|
|
|
@ -60,7 +60,7 @@ public:
|
||||||
* but but be defined because it is a pure virtual in PCB_BASE_FRAME
|
* but but be defined because it is a pure virtual in PCB_BASE_FRAME
|
||||||
*/
|
*/
|
||||||
virtual void SaveCopyInUndoList( BOARD_ITEM* aItemToCopy,
|
virtual void SaveCopyInUndoList( BOARD_ITEM* aItemToCopy,
|
||||||
UndoRedoOpType aTypeCommand = UR_UNSPECIFIED,
|
UNDO_REDO_T aTypeCommand = UR_UNSPECIFIED,
|
||||||
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) )
|
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -71,12 +71,12 @@ public:
|
||||||
* Creates a new entry in undo list of commands.
|
* Creates a new entry in undo list of commands.
|
||||||
* add a list of pickers to handle a list of items
|
* add a list of pickers to handle a list of items
|
||||||
* @param aItemsList = the list of items modified by the command to undo
|
* @param aItemsList = the list of items modified by the command to undo
|
||||||
* @param aTypeCommand = command type (see enum UndoRedoOpType)
|
* @param aTypeCommand = command type (see enum UNDO_REDO_T)
|
||||||
* @param aTransformPoint = the reference point of the transformation,
|
* @param aTransformPoint = the reference point of the transformation,
|
||||||
* for commands like move
|
* for commands like move
|
||||||
*/
|
*/
|
||||||
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
||||||
UndoRedoOpType aTypeCommand,
|
UNDO_REDO_T aTypeCommand,
|
||||||
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) )
|
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) )
|
||||||
{
|
{
|
||||||
// currently: do nothing in cvpcb.
|
// currently: do nothing in cvpcb.
|
||||||
|
|
|
@ -86,12 +86,9 @@ void SCH_EDIT_FRAME::StartMoveBusEntry( SCH_BUS_ENTRY* BusEntry, wxDC* DC )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( !BusEntry->IsNew() ) // not already in edit, save shape
|
if( !BusEntry->IsNew() ) // not already in edit, save shape
|
||||||
{
|
SetUndoItem( BusEntry );
|
||||||
delete g_ItemToUndoCopy;
|
|
||||||
g_ItemToUndoCopy = BusEntry->Clone();
|
|
||||||
}
|
|
||||||
|
|
||||||
BusEntry->m_Flags |= IS_MOVED;
|
BusEntry->SetFlags( IS_MOVED );
|
||||||
|
|
||||||
ItemInitialPosition = BusEntry->m_Pos;
|
ItemInitialPosition = BusEntry->m_Pos;
|
||||||
|
|
||||||
|
|
|
@ -70,8 +70,6 @@ static void abortMoveField( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
|
||||||
}
|
}
|
||||||
|
|
||||||
frame->SetCurrentField( NULL );
|
frame->SetCurrentField( NULL );
|
||||||
|
|
||||||
SAFE_DELETE( g_ItemToUndoCopy );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -85,9 +83,7 @@ void SCH_EDIT_FRAME::MoveField( SCH_FIELD* aField, wxDC* aDC )
|
||||||
SCH_COMPONENT* comp = (SCH_COMPONENT*) aField->GetParent();
|
SCH_COMPONENT* comp = (SCH_COMPONENT*) aField->GetParent();
|
||||||
|
|
||||||
SetCurrentField( aField );
|
SetCurrentField( aField );
|
||||||
|
SetUndoItem( comp );
|
||||||
SAFE_DELETE( g_ItemToUndoCopy );
|
|
||||||
g_ItemToUndoCopy = new SCH_COMPONENT( *comp );
|
|
||||||
|
|
||||||
pos = comp->m_Pos;
|
pos = comp->m_Pos;
|
||||||
|
|
||||||
|
|
|
@ -19,58 +19,87 @@
|
||||||
#include "eeschema_id.h"
|
#include "eeschema_id.h"
|
||||||
|
|
||||||
|
|
||||||
static void ShowWhileMoving( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
|
|
||||||
bool aErase );
|
|
||||||
static void ExitMoveTexte( EDA_DRAW_PANEL* panel, wxDC* DC );
|
|
||||||
|
|
||||||
|
|
||||||
static wxPoint ItemInitialPosition;
|
|
||||||
static int OldOrient;
|
|
||||||
static wxSize OldSize;
|
|
||||||
static int lastGlobalLabelShape = (int) NET_INPUT;
|
static int lastGlobalLabelShape = (int) NET_INPUT;
|
||||||
static int lastTextOrientation = 0;
|
static int lastTextOrientation = 0;
|
||||||
static bool lastTextBold = false;
|
static bool lastTextBold = false;
|
||||||
static bool lastTextItalic = false;
|
static bool lastTextItalic = false;
|
||||||
|
|
||||||
|
|
||||||
void SCH_EDIT_FRAME::StartMoveTexte( SCH_TEXT* aTextItem, wxDC* aDC )
|
static void moveText( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool aErase )
|
||||||
{
|
{
|
||||||
if( aTextItem == NULL )
|
SCH_SCREEN* screen = (SCH_SCREEN*) aPanel->GetScreen();
|
||||||
|
SCH_TEXT* textItem = (SCH_TEXT*) screen->GetCurItem();
|
||||||
|
|
||||||
|
wxCHECK_RET( (textItem != NULL) && textItem->CanIncrementLabel(),
|
||||||
|
wxT( "Cannot move invalid text type." ) );
|
||||||
|
|
||||||
|
// Erase the current text at its current position.
|
||||||
|
if( aErase )
|
||||||
|
textItem->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode );
|
||||||
|
|
||||||
|
textItem->m_Pos = screen->GetCrossHairPosition();
|
||||||
|
|
||||||
|
// Draw the text item at it's new position.
|
||||||
|
textItem->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void abortMoveText( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
|
||||||
|
{
|
||||||
|
SCH_SCREEN* screen = (SCH_SCREEN*) aPanel->GetScreen();
|
||||||
|
SCH_ITEM* item = screen->GetCurItem();
|
||||||
|
SCH_EDIT_FRAME* parent = ( SCH_EDIT_FRAME* ) aPanel->GetParent();
|
||||||
|
|
||||||
|
parent->SetRepeatItem( NULL );
|
||||||
|
|
||||||
|
if( item == NULL ) /* no current item */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Erase the text item and delete it if new (i.e. it was being just created).
|
||||||
|
item->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode );
|
||||||
|
|
||||||
|
if( item->IsNew() )
|
||||||
|
{
|
||||||
|
SAFE_DELETE( item );
|
||||||
|
}
|
||||||
|
else // Move command on an existing text item, restore the copy of the original.
|
||||||
|
{
|
||||||
|
screen->RemoveFromDrawList( item );
|
||||||
|
delete item;
|
||||||
|
|
||||||
|
item = parent->GetUndoItem();
|
||||||
|
|
||||||
|
wxCHECK_RET( item != NULL, wxT( "Cannot restore undefined last text item." ) );
|
||||||
|
|
||||||
|
screen->AddToDrawList( item );
|
||||||
|
parent->SetUndoItem( NULL );
|
||||||
|
item->Draw( aPanel, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
||||||
|
item->ClearFlags();
|
||||||
|
}
|
||||||
|
|
||||||
|
screen->SetCurItem( NULL );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SCH_EDIT_FRAME::MoveText( SCH_TEXT* aTextItem, wxDC* aDC )
|
||||||
|
{
|
||||||
|
wxCHECK_RET( (aTextItem != NULL) && aTextItem->CanIncrementLabel(),
|
||||||
|
wxT( "Cannot move invalid text item" ) );
|
||||||
|
|
||||||
m_itemToRepeat = NULL;
|
m_itemToRepeat = NULL;
|
||||||
|
|
||||||
if( !aTextItem->IsNew() )
|
|
||||||
{
|
|
||||||
delete g_ItemToUndoCopy;
|
|
||||||
g_ItemToUndoCopy = aTextItem->Clone();
|
|
||||||
}
|
|
||||||
|
|
||||||
aTextItem->SetFlags( IS_MOVED );
|
aTextItem->SetFlags( IS_MOVED );
|
||||||
|
|
||||||
switch( aTextItem->Type() )
|
SetUndoItem( (SCH_ITEM*) aTextItem );
|
||||||
{
|
|
||||||
case SCH_LABEL_T:
|
|
||||||
case SCH_GLOBAL_LABEL_T:
|
|
||||||
case SCH_HIERARCHICAL_LABEL_T:
|
|
||||||
case SCH_TEXT_T:
|
|
||||||
ItemInitialPosition = aTextItem->m_Pos;
|
|
||||||
OldSize = aTextItem->m_Size;
|
|
||||||
OldOrient = aTextItem->GetOrientation();
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
DrawPanel->CrossHairOff( aDC );
|
DrawPanel->CrossHairOff( aDC );
|
||||||
GetScreen()->SetCrossHairPosition( ItemInitialPosition );
|
GetScreen()->SetCrossHairPosition( aTextItem->m_Pos );
|
||||||
DrawPanel->MoveCursorToCrossHair();
|
DrawPanel->MoveCursorToCrossHair();
|
||||||
|
|
||||||
OnModify();
|
OnModify();
|
||||||
DrawPanel->SetMouseCapture( ShowWhileMoving, ExitMoveTexte );
|
DrawPanel->SetMouseCapture( moveText, abortMoveText );
|
||||||
GetScreen()->SetCurItem( aTextItem );
|
GetScreen()->SetCurItem( aTextItem );
|
||||||
DrawPanel->m_mouseCaptureCallback( DrawPanel, aDC, wxDefaultPosition, true );
|
moveText( DrawPanel, aDC, wxDefaultPosition, true );
|
||||||
|
|
||||||
DrawPanel->CrossHairOn( aDC );
|
DrawPanel->CrossHairOn( aDC );
|
||||||
}
|
}
|
||||||
|
@ -78,24 +107,10 @@ void SCH_EDIT_FRAME::StartMoveTexte( SCH_TEXT* aTextItem, wxDC* aDC )
|
||||||
|
|
||||||
void SCH_EDIT_FRAME::ChangeTextOrient( SCH_TEXT* aTextItem, wxDC* aDC )
|
void SCH_EDIT_FRAME::ChangeTextOrient( SCH_TEXT* aTextItem, wxDC* aDC )
|
||||||
{
|
{
|
||||||
wxCHECK_RET( aTextItem != NULL, wxT( "Invalid schematic text item." ) );
|
wxCHECK_RET( (aTextItem != NULL) && aTextItem->CanIncrementLabel(),
|
||||||
|
wxT( "Invalid schematic text item." ) );
|
||||||
|
|
||||||
int orient;
|
int orient = ( aTextItem->GetOrientation() + 1 ) & 3;
|
||||||
|
|
||||||
switch( aTextItem->Type() )
|
|
||||||
{
|
|
||||||
case SCH_LABEL_T:
|
|
||||||
case SCH_GLOBAL_LABEL_T:
|
|
||||||
case SCH_HIERARCHICAL_LABEL_T:
|
|
||||||
case SCH_TEXT_T:
|
|
||||||
orient = ( aTextItem->GetOrientation() + 1 ) & 3;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
wxFAIL_MSG( wxT( "Invalid schematic item <" ) + aTextItem->GetClass() +
|
|
||||||
wxT( "> passed to SCH_EDIT_FRAME::ChangeTextOrient()" ) );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Save current text orientation in undo list if is not already in edit.
|
// Save current text orientation in undo list if is not already in edit.
|
||||||
if( aTextItem->GetFlags() == 0 )
|
if( aTextItem->GetFlags() == 0 )
|
||||||
|
@ -160,93 +175,19 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* aDC, int aType )
|
||||||
lastTextItalic = textItem->m_Italic;
|
lastTextItalic = textItem->m_Italic;
|
||||||
lastTextOrientation = textItem->GetOrientation();
|
lastTextOrientation = textItem->GetOrientation();
|
||||||
|
|
||||||
if( aType == LAYER_GLOBLABEL || aType == LAYER_HIERLABEL )
|
if( (aType == SCH_GLOBAL_LABEL_T) || (aType == SCH_HIERARCHICAL_LABEL_T) )
|
||||||
{
|
{
|
||||||
lastGlobalLabelShape = textItem->m_Shape;
|
lastGlobalLabelShape = textItem->m_Shape;
|
||||||
}
|
}
|
||||||
|
|
||||||
textItem->Draw( DrawPanel, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
textItem->Draw( DrawPanel, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
||||||
DrawPanel->SetMouseCapture( ShowWhileMoving, ExitMoveTexte );
|
DrawPanel->SetMouseCapture( moveText, abortMoveText );
|
||||||
GetScreen()->SetCurItem( textItem );
|
GetScreen()->SetCurItem( textItem );
|
||||||
|
|
||||||
return textItem;
|
return textItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void ShowWhileMoving( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
|
|
||||||
bool aErase )
|
|
||||||
{
|
|
||||||
SCH_SCREEN* screen = (SCH_SCREEN*) aPanel->GetScreen();
|
|
||||||
SCH_ITEM* textItem = screen->GetCurItem();
|
|
||||||
|
|
||||||
// Erase the current text at its current position.
|
|
||||||
if( aErase )
|
|
||||||
textItem->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode );
|
|
||||||
|
|
||||||
// Draw the text item at it's new position.
|
|
||||||
switch( textItem->Type() )
|
|
||||||
{
|
|
||||||
case SCH_LABEL_T:
|
|
||||||
case SCH_GLOBAL_LABEL_T:
|
|
||||||
case SCH_HIERARCHICAL_LABEL_T:
|
|
||||||
case SCH_TEXT_T:
|
|
||||||
( (SCH_TEXT*) textItem )->m_Pos = screen->GetCrossHairPosition();
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
textItem->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Abort function for the command move text */
|
|
||||||
static void ExitMoveTexte( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
|
|
||||||
{
|
|
||||||
SCH_SCREEN* screen = (SCH_SCREEN*) aPanel->GetScreen();
|
|
||||||
SCH_ITEM* item = screen->GetCurItem();
|
|
||||||
SCH_EDIT_FRAME* parent = ( SCH_EDIT_FRAME* ) aPanel->GetParent();
|
|
||||||
|
|
||||||
parent->SetRepeatItem( NULL );
|
|
||||||
|
|
||||||
if( item == NULL ) /* no current item */
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Erase the text item and delete it if new (i.e. it was being just created).
|
|
||||||
item->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode );
|
|
||||||
|
|
||||||
if( item->IsNew() )
|
|
||||||
{
|
|
||||||
SAFE_DELETE( item );
|
|
||||||
screen->SetCurItem( NULL );
|
|
||||||
}
|
|
||||||
else // this was a move command on "old" text: restore its old settings.
|
|
||||||
{
|
|
||||||
switch( item->Type() )
|
|
||||||
{
|
|
||||||
case SCH_LABEL_T:
|
|
||||||
case SCH_GLOBAL_LABEL_T:
|
|
||||||
case SCH_HIERARCHICAL_LABEL_T:
|
|
||||||
case SCH_TEXT_T:
|
|
||||||
{
|
|
||||||
SCH_TEXT* text = (SCH_TEXT*) item;
|
|
||||||
text->m_Pos = ItemInitialPosition;
|
|
||||||
text->m_Size = OldSize;
|
|
||||||
text->SetOrientation( OldOrient );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
item->Draw( aPanel, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
|
||||||
item->ClearFlags();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void SCH_EDIT_FRAME::OnConvertTextType( wxCommandEvent& aEvent )
|
void SCH_EDIT_FRAME::OnConvertTextType( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
SCH_SCREEN* screen = GetScreen();
|
SCH_SCREEN* screen = GetScreen();
|
||||||
|
@ -314,6 +255,7 @@ void SCH_EDIT_FRAME::OnConvertTextType( wxCommandEvent& aEvent )
|
||||||
* they are not used in labels. Justifications will be set to default value in the new
|
* they are not used in labels. Justifications will be set to default value in the new
|
||||||
* text item type.
|
* text item type.
|
||||||
*/
|
*/
|
||||||
|
newtext->SetFlags( text->GetFlags() );
|
||||||
newtext->m_Shape = text->m_Shape;
|
newtext->m_Shape = text->m_Shape;
|
||||||
newtext->SetOrientation( text->GetOrientation() );
|
newtext->SetOrientation( text->GetOrientation() );
|
||||||
newtext->m_Size = text->m_Size;
|
newtext->m_Size = text->m_Size;
|
||||||
|
@ -321,61 +263,38 @@ void SCH_EDIT_FRAME::OnConvertTextType( wxCommandEvent& aEvent )
|
||||||
newtext->m_Italic = text->m_Italic;
|
newtext->m_Italic = text->m_Italic;
|
||||||
newtext->m_Bold = text->m_Bold;
|
newtext->m_Bold = text->m_Bold;
|
||||||
|
|
||||||
// save current text flag:
|
|
||||||
int flags = text->GetFlags();
|
|
||||||
|
|
||||||
/* add the new text in linked list if old text is in list */
|
|
||||||
if( (flags & IS_NEW) == 0 )
|
|
||||||
{
|
|
||||||
newtext->SetNext( GetScreen()->GetDrawItems() );
|
|
||||||
GetScreen()->SetDrawItems( newtext );
|
|
||||||
OnModify();
|
|
||||||
}
|
|
||||||
|
|
||||||
INSTALL_UNBUFFERED_DC( dc, DrawPanel );
|
|
||||||
|
|
||||||
/* Delete the old text item. If it is a text flagged as new it will be deleted by
|
|
||||||
* ending the mouse capture.
|
|
||||||
*/
|
|
||||||
if( DrawPanel->IsMouseCaptured() )
|
|
||||||
DrawPanel->EndMouseCapture();
|
|
||||||
|
|
||||||
if( (flags & IS_NEW) == 0 ) // Remove old text from current list and save it in undo list
|
|
||||||
{
|
|
||||||
text->ClearFlags();
|
|
||||||
DeleteItem( text ); // old text is really saved in undo list
|
|
||||||
GetScreen()->SetCurItem( NULL );
|
|
||||||
m_itemToRepeat = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
GetScreen()->SetCurItem( NULL );
|
|
||||||
|
|
||||||
delete g_ItemToUndoCopy;
|
|
||||||
g_ItemToUndoCopy = NULL;
|
|
||||||
|
|
||||||
DrawPanel->CrossHairOff( &dc ); // Erase schematic cursor
|
|
||||||
|
|
||||||
/* Save the new text in undo list if the old text was not itself a "new created text"
|
/* Save the new text in undo list if the old text was not itself a "new created text"
|
||||||
* In this case, the old text is already in undo list as a deleted item.
|
* In this case, the old text is already in undo list as a deleted item.
|
||||||
* Of course if the old text was a "new created text" the new text will be
|
* Of course if the old text was a "new created text" the new text will be
|
||||||
* put in undo list later, at the end of the current command (if not aborted)
|
* put in undo list later, at the end of the current command (if not aborted)
|
||||||
*/
|
*/
|
||||||
if( (flags & IS_NEW) == 0 )
|
|
||||||
|
INSTALL_UNBUFFERED_DC( dc, DrawPanel );
|
||||||
|
DrawPanel->CrossHairOff( &dc ); // Erase schematic cursor
|
||||||
|
text->Draw( DrawPanel, &dc, wxPoint( 0, 0 ), g_XorMode );
|
||||||
|
|
||||||
|
screen->RemoveFromDrawList( text );
|
||||||
|
screen->AddToDrawList( newtext );
|
||||||
|
GetScreen()->SetCurItem( newtext );
|
||||||
|
OnModify();
|
||||||
|
newtext->Draw( DrawPanel, &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
||||||
|
DrawPanel->CrossHairOn( &dc ); // redraw schematic cursor
|
||||||
|
|
||||||
|
if( text->GetFlags() == 0 )
|
||||||
{
|
{
|
||||||
SaveCopyInUndoList( newtext, UR_NEW );
|
m_itemToRepeat = NULL;
|
||||||
|
text->ClearFlags();
|
||||||
|
text->SetNext( NULL );
|
||||||
|
text->SetBack( NULL );
|
||||||
|
newtext->ClearFlags();
|
||||||
|
PICKED_ITEMS_LIST pickList;
|
||||||
|
ITEM_PICKER picker( newtext, UR_EXCHANGE_T );
|
||||||
|
picker.SetLink( text );
|
||||||
|
pickList.PushItem( picker );
|
||||||
|
SaveCopyInUndoList( pickList, UR_EXCHANGE_T );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GetScreen()->SetCurItem( newtext );
|
delete text;
|
||||||
newtext->SetFlags( IS_NEW );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( (flags & IS_MOVED) != 0 )
|
|
||||||
{
|
|
||||||
GetScreen()->SetCurItem( newtext );
|
|
||||||
StartMoveTexte( newtext, &dc );
|
|
||||||
}
|
|
||||||
|
|
||||||
newtext->Draw( DrawPanel, &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
|
||||||
DrawPanel->CrossHairOn( &dc ); // redraw schematic cursor
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,10 +29,6 @@ bool g_OptNetListUseNames; /* TRUE to use names rather than net
|
||||||
wxSize g_RepeatStep;
|
wxSize g_RepeatStep;
|
||||||
int g_RepeatDeltaLabel;
|
int g_RepeatDeltaLabel;
|
||||||
|
|
||||||
SCH_ITEM* g_ItemToUndoCopy; /* copy of last modified schematic item
|
|
||||||
* before it is modified (used for undo
|
|
||||||
* managing to restore old values ) */
|
|
||||||
|
|
||||||
bool g_HVLines = true; // Bool: force H or V
|
bool g_HVLines = true; // Bool: force H or V
|
||||||
// directions (Wires, Bus ..)
|
// directions (Wires, Bus ..)
|
||||||
|
|
||||||
|
|
|
@ -52,8 +52,8 @@ void SCH_EDIT_FRAME::OnCopySchematicItemRequest( wxCommandEvent& event )
|
||||||
case SCH_HIERARCHICAL_LABEL_T:
|
case SCH_HIERARCHICAL_LABEL_T:
|
||||||
{
|
{
|
||||||
SCH_TEXT* newitem = (SCH_TEXT*) curr_item->Clone();
|
SCH_TEXT* newitem = (SCH_TEXT*) curr_item->Clone();
|
||||||
newitem->m_Flags = IS_NEW;
|
newitem->SetFlags( IS_NEW );
|
||||||
StartMoveTexte( newitem, &dc );
|
MoveText( newitem, &dc );
|
||||||
/* Redraw the original part in XOR mode */
|
/* Redraw the original part in XOR mode */
|
||||||
curr_item->Draw( DrawPanel, &dc, wxPoint( 0, 0 ), g_XorMode );
|
curr_item->Draw( DrawPanel, &dc, wxPoint( 0, 0 ), g_XorMode );
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,10 +112,6 @@ public:
|
||||||
extern wxSize g_RepeatStep;
|
extern wxSize g_RepeatStep;
|
||||||
extern int g_RepeatDeltaLabel;
|
extern int g_RepeatDeltaLabel;
|
||||||
|
|
||||||
extern SCH_ITEM* g_ItemToUndoCopy; /* copy of last modified schematic item
|
|
||||||
* before it is modified (used for undo
|
|
||||||
* managing to restore old values ) */
|
|
||||||
|
|
||||||
// Management options.
|
// Management options.
|
||||||
extern bool g_HVLines;
|
extern bool g_HVLines;
|
||||||
|
|
||||||
|
|
|
@ -455,14 +455,7 @@ void SCH_EDIT_FRAME::StartMovePart( SCH_COMPONENT* Component, wxDC* DC )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( Component->m_Flags == 0 )
|
if( Component->m_Flags == 0 )
|
||||||
{
|
SetUndoItem( Component );
|
||||||
if( g_ItemToUndoCopy )
|
|
||||||
{
|
|
||||||
SAFE_DELETE( g_ItemToUndoCopy );
|
|
||||||
}
|
|
||||||
|
|
||||||
g_ItemToUndoCopy = Component->Clone();
|
|
||||||
}
|
|
||||||
|
|
||||||
DrawPanel->CrossHairOff( DC );
|
DrawPanel->CrossHairOff( DC );
|
||||||
GetScreen()->SetCrossHairPosition( Component->m_Pos );
|
GetScreen()->SetCrossHairPosition( Component->m_Pos );
|
||||||
|
|
|
@ -102,6 +102,7 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||||
{
|
{
|
||||||
if( GetSheet()->Last() != g_RootSheet )
|
if( GetSheet()->Last() != g_RootSheet )
|
||||||
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_LEAVE_SHEET, _( "Leave Sheet" ), leave_sheet_xpm );
|
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_LEAVE_SHEET, _( "Leave Sheet" ), leave_sheet_xpm );
|
||||||
|
|
||||||
PopMenu->AppendSeparator();
|
PopMenu->AppendSeparator();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -191,10 +192,8 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
wxString msg;
|
wxFAIL_MSG( wxString::Format( wxT( "Cannot create context menu for unknown type %d" ),
|
||||||
msg.Printf( wxT( "SCH_EDIT_FRAME::OnRightClick Error: unknown DrawType %d" ),
|
item->Type() ) );
|
||||||
item->Type() );
|
|
||||||
DisplayError( this, msg );
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,14 @@
|
||||||
#ifndef __PROTOS_H__
|
#ifndef __PROTOS_H__
|
||||||
#define __PROTOS_H__
|
#define __PROTOS_H__
|
||||||
|
|
||||||
#include "class_undoredo_container.h"
|
//#include "class_undoredo_container.h"
|
||||||
|
|
||||||
#include "colors.h"
|
#include "colors.h"
|
||||||
|
|
||||||
|
|
||||||
class EDA_DRAW_PANEL;
|
class EDA_DRAW_PANEL;
|
||||||
class EDA_DRAW_FRAME;
|
class EDA_DRAW_FRAME;
|
||||||
|
class PICKED_ITEMS_LIST;
|
||||||
class SCH_EDIT_FRAME;
|
class SCH_EDIT_FRAME;
|
||||||
class LIB_EDIT_FRAME;
|
class LIB_EDIT_FRAME;
|
||||||
class CMP_LIBRARY;
|
class CMP_LIBRARY;
|
||||||
|
@ -20,39 +21,30 @@ class SCH_SHEET;
|
||||||
class NETLIST_OBJECT;
|
class NETLIST_OBJECT;
|
||||||
|
|
||||||
|
|
||||||
wxString ReturnDefaultFieldName( int aFieldNdx );
|
|
||||||
|
|
||||||
|
|
||||||
/****************/
|
/****************/
|
||||||
/* DATABASE.CPP */
|
/* DATABASE.CPP */
|
||||||
/****************/
|
/****************/
|
||||||
void DisplayCmpDoc( wxString& Name );
|
void DisplayCmpDoc( wxString& Name );
|
||||||
wxString DataBaseGetName( EDA_DRAW_FRAME* frame, wxString& Keys, wxString& BufName );
|
wxString DataBaseGetName( EDA_DRAW_FRAME* frame, wxString& Keys, wxString& BufName );
|
||||||
|
|
||||||
|
|
||||||
/*********************/
|
/*********************/
|
||||||
/* DANGLING_ENDS.CPP */
|
/* DANGLING_ENDS.CPP */
|
||||||
/*********************/
|
/*********************/
|
||||||
bool SegmentIntersect( wxPoint aSegStart, wxPoint aSegEnd, wxPoint aTestPoint );
|
bool SegmentIntersect( wxPoint aSegStart, wxPoint aSegEnd, wxPoint aTestPoint );
|
||||||
|
|
||||||
|
|
||||||
/****************/
|
/****************/
|
||||||
/* BUS_WIRE_JUNCTION.CPP */
|
/* BUS_WIRE_JUNCTION.CPP */
|
||||||
/****************/
|
/****************/
|
||||||
void IncrementLabelMember( wxString& name );
|
void IncrementLabelMember( wxString& name );
|
||||||
|
|
||||||
|
|
||||||
/****************/
|
/****************/
|
||||||
/* EDITPART.CPP */
|
/* EDITPART.CPP */
|
||||||
/****************/
|
/****************/
|
||||||
void InstallCmpeditFrame( SCH_EDIT_FRAME* aParent, SCH_COMPONENT* aComponent );
|
void InstallCmpeditFrame( SCH_EDIT_FRAME* aParent, SCH_COMPONENT* aComponent );
|
||||||
|
|
||||||
void SnapLibItemPoint( int OrigX,
|
|
||||||
int OrigY,
|
|
||||||
int* ClosestX,
|
|
||||||
int* ClosestY,
|
|
||||||
SCH_COMPONENT* DrawLibItem );
|
|
||||||
|
|
||||||
bool LibItemInBox( int x1, int y1, int x2, int y2, SCH_COMPONENT* DrawLibItem );
|
|
||||||
|
|
||||||
|
|
||||||
// operations_on_item_lists.cpp
|
// operations_on_item_lists.cpp
|
||||||
void DeleteItemsInList( EDA_DRAW_PANEL* panel, PICKED_ITEMS_LIST& aItemsList );
|
void DeleteItemsInList( EDA_DRAW_PANEL* panel, PICKED_ITEMS_LIST& aItemsList );
|
||||||
|
|
||||||
|
@ -72,7 +64,6 @@ SCH_ITEM* DuplicateStruct( SCH_ITEM* DrawStruct, bool aClone = false );
|
||||||
/* EEREDRAW.CPP */
|
/* EEREDRAW.CPP */
|
||||||
/***************/
|
/***************/
|
||||||
void DrawDanglingSymbol( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& pos, int Color );
|
void DrawDanglingSymbol( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& pos, int Color );
|
||||||
void RedrawActiveWindow( EDA_DRAW_PANEL* panel, wxDC* DC );
|
|
||||||
|
|
||||||
|
|
||||||
/**************/
|
/**************/
|
||||||
|
@ -87,11 +78,13 @@ EDA_Colors ReturnLayerColor( int Layer );
|
||||||
/**************/
|
/**************/
|
||||||
int IsBusLabel( const wxString& LabelDrawList );
|
int IsBusLabel( const wxString& LabelDrawList );
|
||||||
|
|
||||||
|
|
||||||
/************/
|
/************/
|
||||||
/* PLOT.CPP */
|
/* PLOT.CPP */
|
||||||
/************/
|
/************/
|
||||||
void PlotDrawlist( PLOTTER* plotter, SCH_ITEM* drawlist );
|
void PlotDrawlist( PLOTTER* plotter, SCH_ITEM* drawlist );
|
||||||
|
|
||||||
|
|
||||||
/***************/
|
/***************/
|
||||||
/* DELSHEET.CPP */
|
/* DELSHEET.CPP */
|
||||||
/***************/
|
/***************/
|
||||||
|
|
|
@ -586,19 +586,8 @@ void SCH_COMPONENT::SwapData( SCH_COMPONENT* copyitem )
|
||||||
void SCH_COMPONENT::Place( SCH_EDIT_FRAME* frame, wxDC* DC )
|
void SCH_COMPONENT::Place( SCH_EDIT_FRAME* frame, wxDC* DC )
|
||||||
{
|
{
|
||||||
/* save old text in undo list */
|
/* save old text in undo list */
|
||||||
if( g_ItemToUndoCopy && ( g_ItemToUndoCopy->Type() == Type() ) && !IsNew() )
|
if( !IsNew() )
|
||||||
{
|
frame->SaveUndoItemInUndoList( this );
|
||||||
/* restore old values and save new ones */
|
|
||||||
SwapData( (SCH_COMPONENT*) g_ItemToUndoCopy );
|
|
||||||
|
|
||||||
/* save in undo list */
|
|
||||||
frame->SaveCopyInUndoList( this, UR_CHANGED );
|
|
||||||
|
|
||||||
/* restore new values */
|
|
||||||
SwapData( (SCH_COMPONENT*) g_ItemToUndoCopy );
|
|
||||||
|
|
||||||
SAFE_DELETE( g_ItemToUndoCopy );
|
|
||||||
}
|
|
||||||
|
|
||||||
SCH_ITEM::Place( frame, DC );
|
SCH_ITEM::Place( frame, DC );
|
||||||
}
|
}
|
||||||
|
|
|
@ -371,12 +371,7 @@ void SCH_FIELD::Place( SCH_EDIT_FRAME* frame, wxDC* DC )
|
||||||
SCH_COMPONENT* component = (SCH_COMPONENT*) GetParent();
|
SCH_COMPONENT* component = (SCH_COMPONENT*) GetParent();
|
||||||
|
|
||||||
// save old cmp in undo list
|
// save old cmp in undo list
|
||||||
if( g_ItemToUndoCopy && ( g_ItemToUndoCopy->Type() == component->Type() ) )
|
frame->SaveUndoItemInUndoList( component );
|
||||||
{
|
|
||||||
component->SwapData( (SCH_COMPONENT*) g_ItemToUndoCopy );
|
|
||||||
frame->SaveCopyInUndoList( component, UR_CHANGED );
|
|
||||||
component->SwapData( (SCH_COMPONENT*) g_ItemToUndoCopy );
|
|
||||||
}
|
|
||||||
|
|
||||||
fieldNdx = m_FieldId;
|
fieldNdx = m_FieldId;
|
||||||
m_AddExtraText = 0;
|
m_AddExtraText = 0;
|
||||||
|
@ -393,7 +388,7 @@ void SCH_FIELD::Place( SCH_EDIT_FRAME* frame, wxDC* DC )
|
||||||
}
|
}
|
||||||
|
|
||||||
Draw( frame->DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
Draw( frame->DrawPanel, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE );
|
||||||
m_Flags = 0;
|
ClearFlags();
|
||||||
frame->GetScreen()->SetCurItem( NULL );
|
frame->GetScreen()->SetCurItem( NULL );
|
||||||
frame->OnModify();
|
frame->OnModify();
|
||||||
frame->SetCurrentField( NULL );
|
frame->SetCurrentField( NULL );
|
||||||
|
|
|
@ -121,22 +121,22 @@ void SCH_SCREEN::DecRefCount()
|
||||||
|
|
||||||
void SCH_SCREEN::FreeDrawList()
|
void SCH_SCREEN::FreeDrawList()
|
||||||
{
|
{
|
||||||
SCH_ITEM* DrawStruct;
|
SCH_ITEM* item;
|
||||||
|
|
||||||
while( GetDrawItems() != NULL )
|
while( GetDrawItems() != NULL )
|
||||||
{
|
{
|
||||||
DrawStruct = GetDrawItems();
|
item = GetDrawItems();
|
||||||
SetDrawItems( GetDrawItems()->Next() );
|
SetDrawItems( GetDrawItems()->Next() );
|
||||||
SAFE_DELETE( DrawStruct );
|
SAFE_DELETE( item );
|
||||||
}
|
}
|
||||||
|
|
||||||
SetDrawItems( NULL );
|
SetDrawItems( NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SCH_SCREEN::RemoveFromDrawList( SCH_ITEM * DrawStruct )
|
void SCH_SCREEN::RemoveFromDrawList( SCH_ITEM* aItem )
|
||||||
{
|
{
|
||||||
if( DrawStruct == GetDrawItems() )
|
if( aItem == GetDrawItems() )
|
||||||
{
|
{
|
||||||
SetDrawItems( GetDrawItems()->Next() );
|
SetDrawItems( GetDrawItems()->Next() );
|
||||||
}
|
}
|
||||||
|
@ -146,7 +146,7 @@ void SCH_SCREEN::RemoveFromDrawList( SCH_ITEM * DrawStruct )
|
||||||
|
|
||||||
while( DrawList && DrawList->Next() )
|
while( DrawList && DrawList->Next() )
|
||||||
{
|
{
|
||||||
if( DrawList->Next() == DrawStruct )
|
if( DrawList->Next() == aItem )
|
||||||
{
|
{
|
||||||
DrawList->SetNext( DrawList->Next()->Next() );
|
DrawList->SetNext( DrawList->Next()->Next() );
|
||||||
break;
|
break;
|
||||||
|
@ -201,13 +201,13 @@ void SCH_SCREEN::DeleteItem( SCH_ITEM* aItem )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool SCH_SCREEN::CheckIfOnDrawList( SCH_ITEM* st )
|
bool SCH_SCREEN::CheckIfOnDrawList( SCH_ITEM* aItem )
|
||||||
{
|
{
|
||||||
SCH_ITEM* itemList = GetDrawItems();
|
SCH_ITEM* itemList = GetDrawItems();
|
||||||
|
|
||||||
while( itemList )
|
while( itemList )
|
||||||
{
|
{
|
||||||
if( itemList == st )
|
if( itemList == aItem )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
itemList = itemList->Next();
|
itemList = itemList->Next();
|
||||||
|
@ -217,10 +217,10 @@ bool SCH_SCREEN::CheckIfOnDrawList( SCH_ITEM* st )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SCH_SCREEN::AddToDrawList( SCH_ITEM* st )
|
void SCH_SCREEN::AddToDrawList( SCH_ITEM* aItem )
|
||||||
{
|
{
|
||||||
st->SetNext( GetDrawItems() );
|
aItem->SetNext( GetDrawItems() );
|
||||||
SetDrawItems( st );
|
SetDrawItems( aItem );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -418,19 +418,7 @@ void SCH_SHEET::Place( SCH_EDIT_FRAME* frame, wxDC* DC )
|
||||||
}
|
}
|
||||||
else /* save old text in undo list */
|
else /* save old text in undo list */
|
||||||
{
|
{
|
||||||
if( g_ItemToUndoCopy && ( g_ItemToUndoCopy->Type() == Type() ) )
|
frame->SaveUndoItemInUndoList( this );
|
||||||
{
|
|
||||||
/* restore old values and save new ones */
|
|
||||||
SwapData( (SCH_SHEET*) g_ItemToUndoCopy );
|
|
||||||
|
|
||||||
/* save in undo list */
|
|
||||||
frame->SaveCopyInUndoList( this, UR_CHANGED );
|
|
||||||
|
|
||||||
/* restore new values */
|
|
||||||
SwapData( (SCH_SHEET*) g_ItemToUndoCopy );
|
|
||||||
|
|
||||||
SAFE_DELETE( g_ItemToUndoCopy );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SCH_ITEM::Place( frame, DC ); //puts it on the GetDrawItems().
|
SCH_ITEM::Place( frame, DC ); //puts it on the GetDrawItems().
|
||||||
|
|
|
@ -120,8 +120,6 @@ void SCH_SHEET_PIN::Place( SCH_EDIT_FRAME* aFrame, wxDC* aDC )
|
||||||
wxCHECK_RET( (sheet != NULL) && (sheet->Type() == SCH_SHEET_T),
|
wxCHECK_RET( (sheet != NULL) && (sheet->Type() == SCH_SHEET_T),
|
||||||
wxT( "Cannot place sheet pin in invalid schematic sheet object." ) );
|
wxT( "Cannot place sheet pin in invalid schematic sheet object." ) );
|
||||||
|
|
||||||
SAFE_DELETE( g_ItemToUndoCopy );
|
|
||||||
|
|
||||||
int flags = m_Flags;
|
int flags = m_Flags;
|
||||||
m_Flags = 0;
|
m_Flags = 0;
|
||||||
|
|
||||||
|
|
|
@ -326,18 +326,20 @@ void SCH_TEXT::SwapData( SCH_TEXT* copyitem )
|
||||||
void SCH_TEXT::Place( SCH_EDIT_FRAME* frame, wxDC* DC )
|
void SCH_TEXT::Place( SCH_EDIT_FRAME* frame, wxDC* DC )
|
||||||
{
|
{
|
||||||
/* save old text in undo list */
|
/* save old text in undo list */
|
||||||
if( g_ItemToUndoCopy && !IsNew() )
|
if( !IsNew() )
|
||||||
{
|
{
|
||||||
/* restore old values and save new ones */
|
ClearFlags();
|
||||||
SwapData( (SCH_TEXT*) g_ItemToUndoCopy );
|
PICKED_ITEMS_LIST pickList;
|
||||||
|
ITEM_PICKER picker( this, UR_EXCHANGE_T );
|
||||||
|
SCH_ITEM* undoItem = frame->GetUndoItem();
|
||||||
|
|
||||||
/* save in undo list */
|
wxCHECK_RET( undoItem != NULL, wxT( "Invalid text undo item." ) );
|
||||||
frame->SaveCopyInUndoList( this, UR_CHANGED );
|
|
||||||
|
|
||||||
/* restore new values */
|
undoItem->ClearFlags();
|
||||||
SwapData( (SCH_TEXT*) g_ItemToUndoCopy );
|
picker.SetLink( undoItem );
|
||||||
|
frame->SetUndoItem( NULL );
|
||||||
SAFE_DELETE( g_ItemToUndoCopy );
|
pickList.PushItem( picker );
|
||||||
|
frame->SaveCopyInUndoList( pickList, UR_EXCHANGE_T );
|
||||||
}
|
}
|
||||||
|
|
||||||
SCH_ITEM::Place( frame, DC );
|
SCH_ITEM::Place( frame, DC );
|
||||||
|
|
|
@ -476,7 +476,7 @@ void SCH_EDIT_FRAME::Process_Move_Item( SCH_ITEM* DrawStruct, wxDC* DC )
|
||||||
case SCH_GLOBAL_LABEL_T:
|
case SCH_GLOBAL_LABEL_T:
|
||||||
case SCH_HIERARCHICAL_LABEL_T:
|
case SCH_HIERARCHICAL_LABEL_T:
|
||||||
case SCH_TEXT_T:
|
case SCH_TEXT_T:
|
||||||
StartMoveTexte( (SCH_TEXT*) DrawStruct, DC );
|
MoveText( (SCH_TEXT*) DrawStruct, DC );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SCH_COMPONENT_T:
|
case SCH_COMPONENT_T:
|
||||||
|
|
|
@ -188,7 +188,7 @@ void SwapData( EDA_ITEM* aItem, EDA_ITEM* aImage )
|
||||||
|
|
||||||
|
|
||||||
void SCH_EDIT_FRAME::SaveCopyInUndoList( SCH_ITEM* aItem,
|
void SCH_EDIT_FRAME::SaveCopyInUndoList( SCH_ITEM* aItem,
|
||||||
UndoRedoOpType aCommandType,
|
UNDO_REDO_T aCommandType,
|
||||||
const wxPoint& aTransformPoint )
|
const wxPoint& aTransformPoint )
|
||||||
{
|
{
|
||||||
/* Does not save a null item.
|
/* Does not save a null item.
|
||||||
|
@ -252,7 +252,7 @@ void SCH_EDIT_FRAME::SaveCopyInUndoList( SCH_ITEM* aItem,
|
||||||
|
|
||||||
|
|
||||||
void SCH_EDIT_FRAME::SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
void SCH_EDIT_FRAME::SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
||||||
UndoRedoOpType aTypeCommand,
|
UNDO_REDO_T aTypeCommand,
|
||||||
const wxPoint& aTransformPoint )
|
const wxPoint& aTransformPoint )
|
||||||
{
|
{
|
||||||
PICKED_ITEMS_LIST* commandToUndo = new PICKED_ITEMS_LIST();
|
PICKED_ITEMS_LIST* commandToUndo = new PICKED_ITEMS_LIST();
|
||||||
|
@ -268,7 +268,8 @@ void SCH_EDIT_FRAME::SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
||||||
SCH_ITEM* item = (SCH_ITEM*) commandToUndo->GetPickedItem( ii );
|
SCH_ITEM* item = (SCH_ITEM*) commandToUndo->GetPickedItem( ii );
|
||||||
wxASSERT( item );
|
wxASSERT( item );
|
||||||
|
|
||||||
UndoRedoOpType command = commandToUndo->GetPickedItemStatus( ii );
|
UNDO_REDO_T command = commandToUndo->GetPickedItemStatus( ii );
|
||||||
|
|
||||||
if( command == UR_UNSPECIFIED )
|
if( command == UR_UNSPECIFIED )
|
||||||
{
|
{
|
||||||
command = aTypeCommand;
|
command = aTypeCommand;
|
||||||
|
@ -294,14 +295,11 @@ void SCH_EDIT_FRAME::SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
||||||
case UR_ROTATED:
|
case UR_ROTATED:
|
||||||
case UR_NEW:
|
case UR_NEW:
|
||||||
case UR_DELETED:
|
case UR_DELETED:
|
||||||
|
case UR_EXCHANGE_T:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
wxFAIL_MSG( wxString::Format( wxT( "Unknown undo/redo command %d" ), command ) );
|
||||||
wxString msg;
|
|
||||||
msg.Printf( wxT( "SaveCopyInUndoList() error (unknown code %X)" ), command );
|
|
||||||
wxMessageBox( msg );
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -399,13 +397,18 @@ void SCH_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRed
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case UR_EXCHANGE_T:
|
||||||
|
GetScreen()->AddToDrawList( (SCH_ITEM*) aList->GetPickedItemLink( ii ) );
|
||||||
|
GetScreen()->RemoveFromDrawList( item );
|
||||||
|
item->SetNext( NULL );
|
||||||
|
item->SetBack( NULL );
|
||||||
|
aList->SetPickedItem( aList->GetPickedItemLink( ii ), ii );
|
||||||
|
aList->SetPickedItemLink( item, ii );
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
wxFAIL_MSG( wxString::Format( wxT( "Unknown undo/redo command %d" ),
|
||||||
wxString msg;
|
aList->GetPickedItemStatus( ii ) ) );
|
||||||
msg.Printf( wxT( "PutDataInPreviousState() error (unknown code %X)" ),
|
|
||||||
aList->GetPickedItemStatus( ii ) );
|
|
||||||
wxMessageBox( msg );
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -429,7 +432,6 @@ void SCH_EDIT_FRAME::GetSchematicFromUndoList( wxCommandEvent& event )
|
||||||
|
|
||||||
OnModify();
|
OnModify();
|
||||||
SetSheetNumberAndCount();
|
SetSheetNumberAndCount();
|
||||||
ReCreateHToolbar();
|
|
||||||
|
|
||||||
GetScreen()->TestDanglingEnds();
|
GetScreen()->TestDanglingEnds();
|
||||||
DrawPanel->Refresh();
|
DrawPanel->Refresh();
|
||||||
|
@ -441,7 +443,6 @@ void SCH_EDIT_FRAME::GetSchematicFromRedoList( wxCommandEvent& event )
|
||||||
if( GetScreen()->GetRedoCommandCount() == 0 )
|
if( GetScreen()->GetRedoCommandCount() == 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
/* Get the old list */
|
/* Get the old list */
|
||||||
PICKED_ITEMS_LIST* List = GetScreen()->PopCommandFromRedoList();
|
PICKED_ITEMS_LIST* List = GetScreen()->PopCommandFromRedoList();
|
||||||
|
|
||||||
|
@ -454,7 +455,6 @@ void SCH_EDIT_FRAME::GetSchematicFromRedoList( wxCommandEvent& event )
|
||||||
|
|
||||||
OnModify();
|
OnModify();
|
||||||
SetSheetNumberAndCount();
|
SetSheetNumberAndCount();
|
||||||
ReCreateHToolbar();
|
|
||||||
|
|
||||||
GetScreen()->TestDanglingEnds();
|
GetScreen()->TestDanglingEnds();
|
||||||
DrawPanel->Refresh();
|
DrawPanel->Refresh();
|
||||||
|
|
|
@ -175,6 +175,7 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( wxWindow* father,
|
||||||
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 );
|
||||||
|
m_undoItem = NULL;
|
||||||
|
|
||||||
CreateScreens();
|
CreateScreens();
|
||||||
|
|
||||||
|
@ -249,6 +250,7 @@ SCH_EDIT_FRAME::~SCH_EDIT_FRAME()
|
||||||
{
|
{
|
||||||
SetScreen( NULL );
|
SetScreen( NULL );
|
||||||
SAFE_DELETE( m_CurrentSheet ); // a SCH_SHEET_PATH, on the heap.
|
SAFE_DELETE( m_CurrentSheet ); // a SCH_SHEET_PATH, on the heap.
|
||||||
|
SAFE_DELETE( m_undoItem );
|
||||||
SAFE_DELETE( g_RootSheet );
|
SAFE_DELETE( g_RootSheet );
|
||||||
SAFE_DELETE( m_findReplaceData );
|
SAFE_DELETE( m_findReplaceData );
|
||||||
CMP_LIBRARY::RemoveAllLibraries();
|
CMP_LIBRARY::RemoveAllLibraries();
|
||||||
|
@ -344,6 +346,31 @@ void SCH_EDIT_FRAME::CreateScreens()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SCH_EDIT_FRAME::SetUndoItem( const SCH_ITEM* aItem )
|
||||||
|
{
|
||||||
|
if( (aItem != NULL) && (m_undoItem != NULL) )
|
||||||
|
{
|
||||||
|
delete m_undoItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_undoItem = NULL;
|
||||||
|
|
||||||
|
if( aItem )
|
||||||
|
m_undoItem = aItem->Clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SCH_EDIT_FRAME::SaveUndoItemInUndoList( SCH_ITEM* aItem )
|
||||||
|
{
|
||||||
|
wxCHECK_RET( aItem != NULL && m_undoItem != NULL && (aItem->Type() == m_undoItem->Type() ),
|
||||||
|
wxT( "Cannot swap undo item structures. Bad programmer!." ) );
|
||||||
|
|
||||||
|
aItem->SwapData( m_undoItem );
|
||||||
|
SaveCopyInUndoList( aItem, UR_CHANGED );
|
||||||
|
aItem->SwapData( m_undoItem );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void SCH_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
|
void SCH_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
|
||||||
{
|
{
|
||||||
if( m_LibeditFrame && !m_LibeditFrame->Close() ) // Can close component editor?
|
if( m_LibeditFrame && !m_LibeditFrame->Close() ) // Can close component editor?
|
||||||
|
|
|
@ -276,7 +276,6 @@ static void ExitSheet( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
|
||||||
}
|
}
|
||||||
|
|
||||||
screen->SetCurItem( NULL );
|
screen->SetCurItem( NULL );
|
||||||
SAFE_DELETE( g_ItemToUndoCopy );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -288,11 +287,10 @@ static void ExitSheet( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
|
||||||
SCH_SHEET* SCH_EDIT_FRAME::CreateSheet( wxDC* aDC )
|
SCH_SHEET* SCH_EDIT_FRAME::CreateSheet( wxDC* aDC )
|
||||||
{
|
{
|
||||||
m_itemToRepeat = NULL;
|
m_itemToRepeat = NULL;
|
||||||
SAFE_DELETE( g_ItemToUndoCopy );
|
|
||||||
|
|
||||||
SCH_SHEET* sheet = new SCH_SHEET( GetScreen()->GetCrossHairPosition() );
|
SCH_SHEET* sheet = new SCH_SHEET( GetScreen()->GetCrossHairPosition() );
|
||||||
|
|
||||||
sheet->m_Flags = IS_NEW | IS_RESIZED;
|
sheet->SetFlags( IS_NEW | IS_RESIZED );
|
||||||
sheet->m_TimeStamp = GetTimeStamp();
|
sheet->m_TimeStamp = GetTimeStamp();
|
||||||
sheet->SetParent( GetScreen() );
|
sheet->SetParent( GetScreen() );
|
||||||
sheet->SetScreen( NULL );
|
sheet->SetScreen( NULL );
|
||||||
|
@ -341,10 +339,7 @@ void SCH_EDIT_FRAME::ReSizeSheet( SCH_SHEET* aSheet, wxDC* aDC )
|
||||||
DrawPanel->m_mouseCaptureCallback( DrawPanel, aDC, wxDefaultPosition, true );
|
DrawPanel->m_mouseCaptureCallback( DrawPanel, aDC, wxDefaultPosition, true );
|
||||||
|
|
||||||
if( aSheet->IsNew() ) // not already in edit, save a copy for undo/redo
|
if( aSheet->IsNew() ) // not already in edit, save a copy for undo/redo
|
||||||
{
|
SetUndoItem( aSheet );
|
||||||
delete g_ItemToUndoCopy;
|
|
||||||
g_ItemToUndoCopy = DuplicateStruct( aSheet, true );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -364,8 +359,5 @@ void SCH_EDIT_FRAME::StartMoveSheet( SCH_SHEET* aSheet, wxDC* aDC )
|
||||||
DrawPanel->CrossHairOn( aDC );
|
DrawPanel->CrossHairOn( aDC );
|
||||||
|
|
||||||
if( !aSheet->IsNew() ) // not already in edit, save a copy for undo/redo
|
if( !aSheet->IsNew() ) // not already in edit, save a copy for undo/redo
|
||||||
{
|
SetUndoItem( aSheet );
|
||||||
delete g_ItemToUndoCopy;
|
|
||||||
g_ItemToUndoCopy = DuplicateStruct( aSheet, true );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,7 +192,6 @@ SCH_SHEET_PIN* SCH_EDIT_FRAME::ImportSheetPin( SCH_SHEET* aSheet, wxDC* aDC )
|
||||||
}
|
}
|
||||||
|
|
||||||
OnModify();
|
OnModify();
|
||||||
SAFE_DELETE( g_ItemToUndoCopy );
|
|
||||||
SaveCopyInUndoList( aSheet, UR_CHANGED );
|
SaveCopyInUndoList( aSheet, UR_CHANGED );
|
||||||
|
|
||||||
sheetPin = new SCH_SHEET_PIN( aSheet, wxPoint( 0, 0 ), label->m_Text );
|
sheetPin = new SCH_SHEET_PIN( aSheet, wxPoint( 0, 0 ), label->m_Text );
|
||||||
|
|
|
@ -470,7 +470,7 @@ public: GERBVIEW_FRAME( wxWindow* father, const wxString& title,
|
||||||
* but must be defined because it is a pure virtual in PCB_BASE_FRAME
|
* but must be defined because it is a pure virtual in PCB_BASE_FRAME
|
||||||
*/
|
*/
|
||||||
virtual void SaveCopyInUndoList( BOARD_ITEM* aItemToCopy,
|
virtual void SaveCopyInUndoList( BOARD_ITEM* aItemToCopy,
|
||||||
UndoRedoOpType aTypeCommand = UR_UNSPECIFIED,
|
UNDO_REDO_T aTypeCommand = UR_UNSPECIFIED,
|
||||||
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ) { }
|
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -478,12 +478,12 @@ public: GERBVIEW_FRAME( wxWindow* father, const wxString& title,
|
||||||
* Creates a new entry in undo list of commands.
|
* Creates a new entry in undo list of commands.
|
||||||
* add a list of pickers to handle a list of items
|
* add a list of pickers to handle a list of items
|
||||||
* @param aItemsList = the list of items modified by the command to undo
|
* @param aItemsList = the list of items modified by the command to undo
|
||||||
* @param aTypeCommand = command type (see enum UndoRedoOpType)
|
* @param aTypeCommand = command type (see enum UNDO_REDO_T)
|
||||||
* @param aTransformPoint = the reference point of the transformation,
|
* @param aTransformPoint = the reference point of the transformation,
|
||||||
* for commands like move
|
* for commands like move
|
||||||
*/
|
*/
|
||||||
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
||||||
UndoRedoOpType aTypeCommand,
|
UNDO_REDO_T aTypeCommand,
|
||||||
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) )
|
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) )
|
||||||
{
|
{
|
||||||
// currently: do nothing in gerbview.
|
// currently: do nothing in gerbview.
|
||||||
|
|
|
@ -56,7 +56,7 @@ class PICKED_ITEMS_LIST;
|
||||||
/* Type of undo/redo operations
|
/* Type of undo/redo operations
|
||||||
* each type must be redo/undone by a specific operation
|
* each type must be redo/undone by a specific operation
|
||||||
*/
|
*/
|
||||||
enum UndoRedoOpType {
|
enum UNDO_REDO_T {
|
||||||
UR_UNSPECIFIED = 0, // illegal
|
UR_UNSPECIFIED = 0, // illegal
|
||||||
UR_CHANGED, // params of items have a value changed: undo is made by exchange
|
UR_CHANGED, // params of items have a value changed: undo is made by exchange
|
||||||
// values with a copy of these values
|
// values with a copy of these values
|
||||||
|
@ -71,8 +71,10 @@ enum UndoRedoOpType {
|
||||||
UR_WIRE_IMAGE, // Specific to eeschema: handle wires changes
|
UR_WIRE_IMAGE, // Specific to eeschema: handle wires changes
|
||||||
UR_MODEDIT, // Specific to the module editor (modedit creates a full copy of
|
UR_MODEDIT, // Specific to the module editor (modedit creates a full copy of
|
||||||
// the current module when changed)
|
// the current module when changed)
|
||||||
UR_LIBEDIT // Specific to the component editor (libedit creates a full copy
|
UR_LIBEDIT, // Specific to the component editor (libedit creates a full copy
|
||||||
// of the current component when changed)
|
// of the current component when changed)
|
||||||
|
UR_EXCHANGE_T ///< Use for changing the schematic text type where swapping
|
||||||
|
///< data structure is insufficient to restor the change.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -81,7 +83,7 @@ class ITEM_PICKER
|
||||||
friend class PICKED_ITEMS_LIST;
|
friend class PICKED_ITEMS_LIST;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
UndoRedoOpType m_UndoRedoStatus; /* type of operation to undo/redo for this item */
|
UNDO_REDO_T m_UndoRedoStatus; /* type of operation to undo/redo for this item */
|
||||||
EDA_ITEM* m_PickedItem; /* Pointer on the schematic or board item that is concerned
|
EDA_ITEM* m_PickedItem; /* Pointer on the schematic or board item that is concerned
|
||||||
* (picked), or in undo redo commands, the copy of an
|
* (picked), or in undo redo commands, the copy of an
|
||||||
* edited item. */
|
* edited item. */
|
||||||
|
@ -96,7 +98,7 @@ public:
|
||||||
* copy of an active item) and m_Link points the active
|
* copy of an active item) and m_Link points the active
|
||||||
* item in schematic */
|
* item in schematic */
|
||||||
|
|
||||||
ITEM_PICKER( EDA_ITEM* aItem = NULL, UndoRedoOpType aUndoRedoStatus = UR_UNSPECIFIED );
|
ITEM_PICKER( EDA_ITEM* aItem = NULL, UNDO_REDO_T aUndoRedoStatus = UR_UNSPECIFIED );
|
||||||
|
|
||||||
EDA_ITEM* GetItem() const { return m_PickedItem; }
|
EDA_ITEM* GetItem() const { return m_PickedItem; }
|
||||||
|
|
||||||
|
@ -105,6 +107,10 @@ public:
|
||||||
KICAD_T GetItemType() const { return m_PickedItemType; }
|
KICAD_T GetItemType() const { return m_PickedItemType; }
|
||||||
|
|
||||||
void SetItemType( KICAD_T aType ) { m_PickedItemType = aType; }
|
void SetItemType( KICAD_T aType ) { m_PickedItemType = aType; }
|
||||||
|
|
||||||
|
void SetLink( EDA_ITEM* aItem ) { m_Link = aItem; }
|
||||||
|
|
||||||
|
EDA_ITEM* GetLink() const { return m_Link; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -116,7 +122,7 @@ public:
|
||||||
class PICKED_ITEMS_LIST
|
class PICKED_ITEMS_LIST
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
UndoRedoOpType m_Status; /* info about operation to undo/redo for this item. can be
|
UNDO_REDO_T m_Status; /* info about operation to undo/redo for this item. can be
|
||||||
* UR_UNSPECIFIED */
|
* UR_UNSPECIFIED */
|
||||||
wxPoint m_TransformPoint; /* used to undo redo command by the same command: usually
|
wxPoint m_TransformPoint; /* used to undo redo command by the same command: usually
|
||||||
* need to know the rotate point or the move vector */
|
* need to know the rotate point or the move vector */
|
||||||
|
@ -208,7 +214,7 @@ public:
|
||||||
* or UR_UNSPECIFIED if does not exist
|
* or UR_UNSPECIFIED if does not exist
|
||||||
* @param aIdx Index of the picked item in the picked list
|
* @param aIdx Index of the picked item in the picked list
|
||||||
*/
|
*/
|
||||||
UndoRedoOpType GetPickedItemStatus( unsigned int aIdx );
|
UNDO_REDO_T GetPickedItemStatus( unsigned int aIdx );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function GetPickerFlags
|
* Function GetPickerFlags
|
||||||
|
@ -233,7 +239,7 @@ public:
|
||||||
* @param aIdx Index of the picker in the picked list
|
* @param aIdx Index of the picker in the picked list
|
||||||
* @return True if the picker exists or false if does not exist
|
* @return True if the picker exists or false if does not exist
|
||||||
*/
|
*/
|
||||||
bool SetPickedItem( EDA_ITEM* aItem, UndoRedoOpType aStatus, unsigned aIdx );
|
bool SetPickedItem( EDA_ITEM* aItem, UNDO_REDO_T aStatus, unsigned aIdx );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function SetPickedItemLink
|
* Function SetPickedItemLink
|
||||||
|
@ -251,7 +257,7 @@ public:
|
||||||
* @param aIdx Index of the picker in the picked list
|
* @param aIdx Index of the picker in the picked list
|
||||||
* @return True if the picker exists or false if does not exist
|
* @return True if the picker exists or false if does not exist
|
||||||
*/
|
*/
|
||||||
bool SetPickedItemStatus( UndoRedoOpType aStatus, unsigned aIdx );
|
bool SetPickedItemStatus( UNDO_REDO_T aStatus, unsigned aIdx );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function SetPickerFlags
|
* Function SetPickerFlags
|
||||||
|
|
|
@ -88,6 +88,14 @@ public:
|
||||||
|
|
||||||
SCH_ITEM* Clone() const { return ( SCH_ITEM* ) EDA_ITEM::Clone(); }
|
SCH_ITEM* Clone() const { return ( SCH_ITEM* ) EDA_ITEM::Clone(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function SwapDate
|
||||||
|
* swap the internal data structures \a aItem with the schematic item.
|
||||||
|
*
|
||||||
|
* @param aItem The item to swap the data structures with.
|
||||||
|
*/
|
||||||
|
virtual void SwapData( SCH_ITEM* aItem );
|
||||||
|
|
||||||
SCH_ITEM* Next() { return (SCH_ITEM*) Pnext; }
|
SCH_ITEM* Next() { return (SCH_ITEM*) Pnext; }
|
||||||
SCH_ITEM* Back() { return (SCH_ITEM*) Pback; }
|
SCH_ITEM* Back() { return (SCH_ITEM*) Pback; }
|
||||||
|
|
||||||
|
|
|
@ -436,28 +436,26 @@ public:
|
||||||
* Creates a new entry in undo list of commands.
|
* Creates a new entry in undo list of commands.
|
||||||
* add a picker to handle aItemToCopy
|
* add a picker to handle aItemToCopy
|
||||||
* @param aItemToCopy = the board item modified by the command to undo
|
* @param aItemToCopy = the board item modified by the command to undo
|
||||||
* @param aTypeCommand = command type (see enum UndoRedoOpType)
|
* @param aTypeCommand = command type (see enum UNDO_REDO_T)
|
||||||
* @param aTransformPoint = the reference point of the transformation, for
|
* @param aTransformPoint = the reference point of the transformation, for
|
||||||
* commands like move
|
* commands like move
|
||||||
*/
|
*/
|
||||||
virtual void SaveCopyInUndoList( BOARD_ITEM* aItemToCopy,
|
virtual void SaveCopyInUndoList( BOARD_ITEM* aItemToCopy,
|
||||||
UndoRedoOpType aTypeCommand,
|
UNDO_REDO_T aTypeCommand,
|
||||||
const wxPoint& aTransformPoint =
|
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ) = 0;
|
||||||
wxPoint( 0, 0 ) ) = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function SaveCopyInUndoList (virtual pure, overloaded).
|
* Function SaveCopyInUndoList (virtual pure, overloaded).
|
||||||
* Creates a new entry in undo list of commands.
|
* Creates a new entry in undo list of commands.
|
||||||
* add a list of pickers to handle a list of items
|
* add a list of pickers to handle a list of items
|
||||||
* @param aItemsList = the list of items modified by the command to undo
|
* @param aItemsList = the list of items modified by the command to undo
|
||||||
* @param aTypeCommand = command type (see enum UndoRedoOpType)
|
* @param aTypeCommand = command type (see enum UNDO_REDO_T)
|
||||||
* @param aTransformPoint = the reference point of the transformation,
|
* @param aTransformPoint = the reference point of the transformation,
|
||||||
* for commands like move
|
* for commands like move
|
||||||
*/
|
*/
|
||||||
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
||||||
UndoRedoOpType aTypeCommand,
|
UNDO_REDO_T aTypeCommand,
|
||||||
const wxPoint& aTransformPoint =
|
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) ) = 0;
|
||||||
wxPoint( 0, 0 ) ) = 0;
|
|
||||||
|
|
||||||
|
|
||||||
// layerhandling:
|
// layerhandling:
|
||||||
|
|
|
@ -96,6 +96,7 @@ private:
|
||||||
SCH_ITEM* m_itemToRepeat; ///< Last item to insert by the repeat command.
|
SCH_ITEM* m_itemToRepeat; ///< Last item to insert by the repeat command.
|
||||||
int m_repeatLabelDelta; ///< Repeat label number increment step.
|
int m_repeatLabelDelta; ///< Repeat label number increment step.
|
||||||
SCH_COLLECTOR m_collectedItems; ///< List of collected items.
|
SCH_COLLECTOR m_collectedItems; ///< List of collected items.
|
||||||
|
SCH_ITEM* m_undoItem; ///< Copy of the current item being edited.
|
||||||
|
|
||||||
static int m_lastSheetPinType; ///< Last sheet pin type.
|
static int m_lastSheetPinType; ///< Last sheet pin type.
|
||||||
static wxSize m_lastSheetPinTextSize; ///< Last sheet pin text size.
|
static wxSize m_lastSheetPinTextSize; ///< Last sheet pin text size.
|
||||||
|
@ -502,7 +503,7 @@ private:
|
||||||
SCH_TEXT* CreateNewText( wxDC* aDC, int aType );
|
SCH_TEXT* CreateNewText( wxDC* aDC, int aType );
|
||||||
void EditSchematicText( SCH_TEXT* TextStruct );
|
void EditSchematicText( SCH_TEXT* TextStruct );
|
||||||
void ChangeTextOrient( SCH_TEXT* aTextItem, wxDC* aDC );
|
void ChangeTextOrient( SCH_TEXT* aTextItem, wxDC* aDC );
|
||||||
void StartMoveTexte( SCH_TEXT* aTextItem, wxDC* aDC );
|
void MoveText( SCH_TEXT* aTextItem, wxDC* aDC );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function OnCovertTextType
|
* Function OnCovertTextType
|
||||||
|
@ -640,12 +641,12 @@ public:
|
||||||
* wires saved in Undo List (for Undo or Redo commands, saved wires will be
|
* wires saved in Undo List (for Undo or Redo commands, saved wires will be
|
||||||
* exchanged with current wire list
|
* exchanged with current wire list
|
||||||
* @param aItemToCopy = the schematic item modified by the command to undo
|
* @param aItemToCopy = the schematic item modified by the command to undo
|
||||||
* @param aTypeCommand = command type (see enum UndoRedoOpType)
|
* @param aTypeCommand = command type (see enum UNDO_REDO_T)
|
||||||
* @param aTransformPoint = the reference point of the transformation,
|
* @param aTransformPoint = the reference point of the transformation,
|
||||||
* for commands like move
|
* for commands like move
|
||||||
*/
|
*/
|
||||||
void SaveCopyInUndoList( SCH_ITEM* aItemToCopy,
|
void SaveCopyInUndoList( SCH_ITEM* aItemToCopy,
|
||||||
UndoRedoOpType aTypeCommand,
|
UNDO_REDO_T aTypeCommand,
|
||||||
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
|
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -653,12 +654,12 @@ public:
|
||||||
* Creates a new entry in undo list of commands.
|
* Creates a new entry in undo list of commands.
|
||||||
* add a list of pickers to handle a list of items
|
* add a list of pickers to handle a list of items
|
||||||
* @param aItemsList = the list of items modified by the command to undo
|
* @param aItemsList = the list of items modified by the command to undo
|
||||||
* @param aTypeCommand = command type (see enum UndoRedoOpType)
|
* @param aTypeCommand = command type (see enum UNDO_REDO_T)
|
||||||
* @param aTransformPoint = the reference point of the transformation,
|
* @param aTransformPoint = the reference point of the transformation,
|
||||||
* for commands like move
|
* for commands like move
|
||||||
*/
|
*/
|
||||||
void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
||||||
UndoRedoOpType aTypeCommand,
|
UNDO_REDO_T aTypeCommand,
|
||||||
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
|
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -739,6 +740,28 @@ public:
|
||||||
|
|
||||||
void SetRepeatItem( SCH_ITEM* aItem ) { m_itemToRepeat = aItem; }
|
void SetRepeatItem( SCH_ITEM* aItem ) { m_itemToRepeat = aItem; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function SetUndoItem
|
||||||
|
* clones \a aItem which can be used to restore the state of the item being edited
|
||||||
|
* when the user cancels the editing in progress.
|
||||||
|
*
|
||||||
|
* @param aItem The item to make a clone of for undoing the last change. Set to
|
||||||
|
* NULL to free the current undo item.
|
||||||
|
*/
|
||||||
|
void SetUndoItem( const SCH_ITEM* aItem );
|
||||||
|
|
||||||
|
SCH_ITEM* GetUndoItem() const { return m_undoItem; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function SaveUndoItemInUndoList
|
||||||
|
* swaps the cloned item in #m_undoItem with \a aItem and saves it to the undo list
|
||||||
|
* then swap the data back. This swaps the internal structure of the item with the
|
||||||
|
* cloned item. It does not swap the actual item pointers themselves.
|
||||||
|
*
|
||||||
|
* @param aItem The item to swap with the current undo item.
|
||||||
|
*/
|
||||||
|
void SaveUndoItemInUndoList( SCH_ITEM* aItem );
|
||||||
|
|
||||||
// ERC:
|
// ERC:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -411,12 +411,12 @@ public:
|
||||||
* Creates a new entry in undo list of commands.
|
* Creates a new entry in undo list of commands.
|
||||||
* add a picker to handle aItemToCopy
|
* add a picker to handle aItemToCopy
|
||||||
* @param aItemToCopy = the board item modified by the command to undo
|
* @param aItemToCopy = the board item modified by the command to undo
|
||||||
* @param aTypeCommand = command type (see enum UndoRedoOpType)
|
* @param aTypeCommand = command type (see enum UNDO_REDO_T)
|
||||||
* @param aTransformPoint = the reference point of the transformation, for
|
* @param aTransformPoint = the reference point of the transformation, for
|
||||||
* commands like move
|
* commands like move
|
||||||
*/
|
*/
|
||||||
virtual void SaveCopyInUndoList( BOARD_ITEM* aItemToCopy,
|
virtual void SaveCopyInUndoList( BOARD_ITEM* aItemToCopy,
|
||||||
UndoRedoOpType aTypeCommand,
|
UNDO_REDO_T aTypeCommand,
|
||||||
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
|
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -424,12 +424,12 @@ public:
|
||||||
* Creates a new entry in undo list of commands.
|
* Creates a new entry in undo list of commands.
|
||||||
* add a list of pickers to handle a list of items
|
* add a list of pickers to handle a list of items
|
||||||
* @param aItemsList = the list of items modified by the command to undo
|
* @param aItemsList = the list of items modified by the command to undo
|
||||||
* @param aTypeCommand = command type (see enum UndoRedoOpType)
|
* @param aTypeCommand = command type (see enum UNDO_REDO_T)
|
||||||
* @param aTransformPoint = the reference point of the transformation, for
|
* @param aTransformPoint = the reference point of the transformation, for
|
||||||
* commands like move
|
* commands like move
|
||||||
*/
|
*/
|
||||||
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
||||||
UndoRedoOpType aTypeCommand,
|
UNDO_REDO_T aTypeCommand,
|
||||||
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
|
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -339,7 +339,7 @@ BOARD_ITEM* DuplicateStruct( BOARD_ITEM* aItem )
|
||||||
* UR_ROTATED
|
* UR_ROTATED
|
||||||
*/
|
*/
|
||||||
void PCB_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem,
|
void PCB_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem,
|
||||||
UndoRedoOpType aCommandType,
|
UNDO_REDO_T aCommandType,
|
||||||
const wxPoint& aTransformPoint )
|
const wxPoint& aTransformPoint )
|
||||||
{
|
{
|
||||||
if( aItem == NULL ) // Nothing to save
|
if( aItem == NULL ) // Nothing to save
|
||||||
|
@ -399,7 +399,7 @@ void PCB_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem,
|
||||||
* @param aTransformPoint - Transform items around this point.
|
* @param aTransformPoint - Transform items around this point.
|
||||||
*/
|
*/
|
||||||
void PCB_EDIT_FRAME::SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
void PCB_EDIT_FRAME::SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
||||||
UndoRedoOpType aTypeCommand,
|
UNDO_REDO_T aTypeCommand,
|
||||||
const wxPoint& aTransformPoint )
|
const wxPoint& aTransformPoint )
|
||||||
{
|
{
|
||||||
PICKED_ITEMS_LIST* commandToUndo = new PICKED_ITEMS_LIST();
|
PICKED_ITEMS_LIST* commandToUndo = new PICKED_ITEMS_LIST();
|
||||||
|
@ -413,7 +413,7 @@ void PCB_EDIT_FRAME::SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
||||||
for( unsigned ii = 0; ii < commandToUndo->GetCount(); ii++ )
|
for( unsigned ii = 0; ii < commandToUndo->GetCount(); ii++ )
|
||||||
{
|
{
|
||||||
BOARD_ITEM* item = (BOARD_ITEM*) commandToUndo->GetPickedItem( ii );
|
BOARD_ITEM* item = (BOARD_ITEM*) commandToUndo->GetPickedItem( ii );
|
||||||
UndoRedoOpType command = commandToUndo->GetPickedItemStatus( ii );
|
UNDO_REDO_T command = commandToUndo->GetPickedItemStatus( ii );
|
||||||
if( command == UR_UNSPECIFIED )
|
if( command == UR_UNSPECIFIED )
|
||||||
{
|
{
|
||||||
command = aTypeCommand;
|
command = aTypeCommand;
|
||||||
|
|
|
@ -18,11 +18,11 @@
|
||||||
* Creates a new entry in undo list of commands.
|
* Creates a new entry in undo list of commands.
|
||||||
* add a picker to handle aItemToCopy
|
* add a picker to handle aItemToCopy
|
||||||
* @param aItem = the board item modified by the command to undo
|
* @param aItem = the board item modified by the command to undo
|
||||||
* @param aTypeCommand = command type (see enum UndoRedoOpType)
|
* @param aTypeCommand = command type (see enum UNDO_REDO_T)
|
||||||
* @param aTransformPoint = the reference point of the transformation, for commands like move
|
* @param aTransformPoint = the reference point of the transformation, for commands like move
|
||||||
*/
|
*/
|
||||||
void WinEDA_ModuleEditFrame::SaveCopyInUndoList( BOARD_ITEM* aItem,
|
void WinEDA_ModuleEditFrame::SaveCopyInUndoList( BOARD_ITEM* aItem,
|
||||||
UndoRedoOpType aTypeCommand,
|
UNDO_REDO_T aTypeCommand,
|
||||||
const wxPoint& aTransformPoint )
|
const wxPoint& aTransformPoint )
|
||||||
{
|
{
|
||||||
EDA_ITEM* item;
|
EDA_ITEM* item;
|
||||||
|
@ -52,11 +52,11 @@ void WinEDA_ModuleEditFrame::SaveCopyInUndoList( BOARD_ITEM* aItem,
|
||||||
* Creates a new entry in undo list of commands.
|
* Creates a new entry in undo list of commands.
|
||||||
* add a list of pickers to handle a list of items
|
* add a list of pickers to handle a list of items
|
||||||
* @param aItemsList = the list of items modified by the command to undo
|
* @param aItemsList = the list of items modified by the command to undo
|
||||||
* @param aTypeCommand = command type (see enum UndoRedoOpType)
|
* @param aTypeCommand = command type (see enum UNDO_REDO_T)
|
||||||
* @param aTransformPoint = the reference point of the transformation, for commands like move
|
* @param aTransformPoint = the reference point of the transformation, for commands like move
|
||||||
*/
|
*/
|
||||||
void WinEDA_ModuleEditFrame::SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
void WinEDA_ModuleEditFrame::SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
||||||
UndoRedoOpType aTypeCommand,
|
UNDO_REDO_T aTypeCommand,
|
||||||
const wxPoint& aTransformPoint )
|
const wxPoint& aTransformPoint )
|
||||||
{
|
{
|
||||||
// Currently unused in modedit, because the module itself is saved for each change
|
// Currently unused in modedit, because the module itself is saved for each change
|
||||||
|
|
|
@ -114,28 +114,26 @@ public:
|
||||||
* Creates a new entry in undo list of commands.
|
* Creates a new entry in undo list of commands.
|
||||||
* add a picker to handle aItemToCopy
|
* add a picker to handle aItemToCopy
|
||||||
* @param aItem = the board item modified by the command to undo
|
* @param aItem = the board item modified by the command to undo
|
||||||
* @param aTypeCommand = command type (see enum UndoRedoOpType)
|
* @param aTypeCommand = command type (see enum UNDO_REDO_T)
|
||||||
* @param aTransformPoint = the reference point of the transformation, for
|
* @param aTransformPoint = the reference point of the transformation, for
|
||||||
* commands like move
|
* commands like move
|
||||||
*/
|
*/
|
||||||
virtual void SaveCopyInUndoList( BOARD_ITEM* aItem,
|
virtual void SaveCopyInUndoList( BOARD_ITEM* aItem,
|
||||||
UndoRedoOpType aTypeCommand,
|
UNDO_REDO_T aTypeCommand,
|
||||||
const wxPoint& aTransformPoint =
|
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
|
||||||
wxPoint( 0, 0 ) );
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function SaveCopyInUndoList (overloaded).
|
* Function SaveCopyInUndoList (overloaded).
|
||||||
* Creates a new entry in undo list of commands.
|
* Creates a new entry in undo list of commands.
|
||||||
* add a list of pickers to handle a list of items
|
* add a list of pickers to handle a list of items
|
||||||
* @param aItemsList = the list of items modified by the command to undo
|
* @param aItemsList = the list of items modified by the command to undo
|
||||||
* @param aTypeCommand = command type (see enum UndoRedoOpType)
|
* @param aTypeCommand = command type (see enum UNDO_REDO_T)
|
||||||
* @param aTransformPoint = the reference point of the transformation, for
|
* @param aTransformPoint = the reference point of the transformation, for
|
||||||
* commands like move
|
* commands like move
|
||||||
*/
|
*/
|
||||||
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList,
|
||||||
UndoRedoOpType aTypeCommand,
|
UNDO_REDO_T aTypeCommand,
|
||||||
const wxPoint& aTransformPoint =
|
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
|
||||||
wxPoint( 0, 0 ) );
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetComponentFromUndoList( wxCommandEvent& event );
|
void GetComponentFromUndoList( wxCommandEvent& event );
|
||||||
|
|
|
@ -165,7 +165,7 @@ void UpdateCopyOfZonesList( PICKED_ITEMS_LIST& aPickList,
|
||||||
{
|
{
|
||||||
for( unsigned kk = 0; kk < aPickList.GetCount(); kk++ )
|
for( unsigned kk = 0; kk < aPickList.GetCount(); kk++ )
|
||||||
{
|
{
|
||||||
UndoRedoOpType status = aPickList.GetPickedItemStatus( kk );
|
UNDO_REDO_T status = aPickList.GetPickedItemStatus( kk );
|
||||||
|
|
||||||
ZONE_CONTAINER* ref = (ZONE_CONTAINER*) aPickList.GetPickedItem( kk );
|
ZONE_CONTAINER* ref = (ZONE_CONTAINER*) aPickList.GetPickedItem( kk );
|
||||||
for( unsigned ii = 0; ; ii++ ) // analyse the main picked list
|
for( unsigned ii = 0; ; ii++ ) // analyse the main picked list
|
||||||
|
|
Loading…
Reference in New Issue