2007-06-05 12:10:51 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dialog_erc.cpp
|
2008-04-14 19:22:48 +00:00
|
|
|
// Purpose:
|
2007-06-05 12:10:51 +00:00
|
|
|
// Author: jean-pierre Charras
|
2008-04-14 19:22:48 +00:00
|
|
|
// Modified by:
|
2009-07-03 18:25:06 +00:00
|
|
|
// Created: 02/07/2000
|
2009-11-03 13:26:31 +00:00
|
|
|
// License: GPL
|
2007-06-05 12:10:51 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#include "fctsys.h"
|
|
|
|
#include "common.h"
|
2009-07-03 18:25:06 +00:00
|
|
|
#include "class_drawpanel.h"
|
2009-09-25 18:49:04 +00:00
|
|
|
#include "bitmaps.h"
|
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
#include "program.h"
|
|
|
|
#include "general.h"
|
|
|
|
#include "netlist.h"
|
2009-07-07 17:50:02 +00:00
|
|
|
#include "class_marker_sch.h"
|
2010-03-04 09:32:51 +00:00
|
|
|
#include "class_pin.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
#include "protos.h"
|
|
|
|
|
|
|
|
#include "dialog_erc.h"
|
2009-07-08 15:42:45 +00:00
|
|
|
#include "dialog_erc_listbox.h"
|
2009-07-07 17:50:02 +00:00
|
|
|
#include "erc.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
|
2009-07-03 18:25:06 +00:00
|
|
|
BEGIN_EVENT_TABLE( DIALOG_ERC, DIALOG_ERC_BASE )
|
2009-11-03 13:26:31 +00:00
|
|
|
EVT_COMMAND_RANGE( ID_MATRIX_0, ID_MATRIX_0 + ( PIN_NMAX * PIN_NMAX ) - 1,
|
|
|
|
wxEVT_COMMAND_BUTTON_CLICKED,
|
|
|
|
DIALOG_ERC::ChangeErrorLevel )
|
2007-06-05 12:10:51 +00:00
|
|
|
END_EVENT_TABLE()
|
|
|
|
|
2009-07-08 15:42:45 +00:00
|
|
|
DIALOG_ERC::DIALOG_ERC( WinEDA_SchematicFrame* parent ) :
|
|
|
|
DIALOG_ERC_BASE( parent )
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2009-07-08 15:42:45 +00:00
|
|
|
m_Parent = parent;
|
|
|
|
Init();
|
2009-07-03 18:25:06 +00:00
|
|
|
|
2009-07-08 15:42:45 +00:00
|
|
|
GetSizer()->SetSizeHints( this );
|
2009-12-06 18:04:41 +00:00
|
|
|
Centre();
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
2009-07-08 15:42:45 +00:00
|
|
|
|
2009-07-03 18:25:06 +00:00
|
|
|
void DIALOG_ERC::Init()
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2009-07-03 18:25:06 +00:00
|
|
|
SetFocus();
|
2008-04-14 19:22:48 +00:00
|
|
|
|
2009-07-08 15:42:45 +00:00
|
|
|
m_Initialized = FALSE;
|
|
|
|
for( int ii = 0; ii < PIN_NMAX; ii++ )
|
|
|
|
for( int jj = 0; jj < PIN_NMAX; jj++ )
|
|
|
|
m_ButtonList[ii][jj] = NULL;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-07-03 18:25:06 +00:00
|
|
|
m_WriteResultOpt->SetValue( WriteFichierERC );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-07-08 15:42:45 +00:00
|
|
|
wxString num;
|
|
|
|
num.Printf( wxT( "%d" ), g_EESchemaVar.NbErrorErc );
|
|
|
|
m_TotalErrCount->SetLabel( num );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-11-03 13:26:31 +00:00
|
|
|
num.Printf( wxT(
|
|
|
|
"%d" ), g_EESchemaVar.NbErrorErc -
|
|
|
|
g_EESchemaVar.NbWarningErc );
|
2009-07-08 15:42:45 +00:00
|
|
|
m_LastErrCount->SetLabel( num );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-07-08 15:42:45 +00:00
|
|
|
num.Printf( wxT( "%d" ), g_EESchemaVar.NbWarningErc );
|
|
|
|
m_LastWarningCount->SetLabel( num );
|
2008-04-14 19:22:48 +00:00
|
|
|
|
2009-07-08 15:42:45 +00:00
|
|
|
DisplayERC_MarkersList();
|
2009-07-05 12:09:41 +00:00
|
|
|
|
2009-07-08 15:42:45 +00:00
|
|
|
// Init Panel Matrix
|
|
|
|
ReBuildMatrixPanel();
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
2009-07-08 15:42:45 +00:00
|
|
|
|
2009-07-05 12:09:41 +00:00
|
|
|
/* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ERASE_DRC_MARKERS */
|
2009-07-03 18:25:06 +00:00
|
|
|
void DIALOG_ERC::OnEraseDrcMarkersClick( wxCommandEvent& event )
|
2009-11-03 13:26:31 +00:00
|
|
|
{
|
2009-07-03 18:25:06 +00:00
|
|
|
/* Delete the old ERC markers, over the whole hierarchy
|
|
|
|
*/
|
2009-07-07 17:50:02 +00:00
|
|
|
DeleteAllMarkers( MARK_ERC );
|
2009-07-08 18:06:11 +00:00
|
|
|
m_MarkersList->ClearList();
|
2009-07-03 18:25:06 +00:00
|
|
|
m_Parent->DrawPanel->Refresh();
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
2009-07-08 15:42:45 +00:00
|
|
|
|
2009-07-05 12:09:41 +00:00
|
|
|
/* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL */
|
2009-07-03 18:25:06 +00:00
|
|
|
void DIALOG_ERC::OnCancelClick( wxCommandEvent& event )
|
2008-04-14 19:22:48 +00:00
|
|
|
{
|
2009-07-08 15:42:45 +00:00
|
|
|
EndModal( 0 );
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
2009-07-03 18:25:06 +00:00
|
|
|
|
2009-07-05 12:09:41 +00:00
|
|
|
/* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RESET_MATRIX */
|
2009-07-03 18:25:06 +00:00
|
|
|
void DIALOG_ERC::OnResetMatrixClick( wxCommandEvent& event )
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2009-07-08 15:42:45 +00:00
|
|
|
ResetDefaultERCDiag( event );
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
2009-07-03 18:25:06 +00:00
|
|
|
|
2009-07-05 12:09:41 +00:00
|
|
|
/* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ERC_CMP */
|
2009-07-03 18:25:06 +00:00
|
|
|
void DIALOG_ERC::OnErcCmpClick( wxCommandEvent& event )
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2009-07-08 15:42:45 +00:00
|
|
|
wxBusyCursor();
|
2009-07-08 18:06:11 +00:00
|
|
|
m_MarkersList->Clear();
|
2009-07-03 18:25:06 +00:00
|
|
|
m_MessagesList->Clear();
|
2009-07-08 18:06:11 +00:00
|
|
|
wxSafeYield(); // m_MarkersList must be redraw
|
2009-07-08 15:42:45 +00:00
|
|
|
wxArrayString messageList;
|
|
|
|
TestErc( &messageList );
|
2009-11-03 13:26:31 +00:00
|
|
|
for( unsigned ii = 0; ii < messageList.GetCount(); ii++ )
|
|
|
|
m_MessagesList->AppendText( messageList[ii] );
|
2009-07-08 15:42:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Double click on a marker info:
|
|
|
|
void DIALOG_ERC::OnLeftDClickMarkersList( wxCommandEvent& event )
|
|
|
|
{
|
2009-07-08 18:06:11 +00:00
|
|
|
int index = m_MarkersList->GetSelection();
|
2009-07-08 15:42:45 +00:00
|
|
|
|
|
|
|
if( index < 0 )
|
|
|
|
return;
|
|
|
|
|
2009-12-02 21:44:03 +00:00
|
|
|
const SCH_MARKER* marker = m_MarkersList->GetItem( (unsigned) index );
|
2009-07-08 15:42:45 +00:00
|
|
|
|
|
|
|
EndModal( 1 );
|
|
|
|
|
|
|
|
|
|
|
|
// Search for the selected marker
|
2009-12-02 21:44:03 +00:00
|
|
|
SCH_SHEET_PATH* sheet;
|
|
|
|
bool NotFound;
|
|
|
|
wxPoint pos = marker->m_Pos;
|
|
|
|
wxPoint curpos, old_cursor_position;
|
2009-07-08 15:42:45 +00:00
|
|
|
|
2009-12-02 21:44:03 +00:00
|
|
|
SCH_SHEET_LIST SheetList;
|
2009-07-08 15:42:45 +00:00
|
|
|
|
|
|
|
NotFound = TRUE;
|
|
|
|
/* Search for the selected marker */
|
2009-11-03 13:26:31 +00:00
|
|
|
for( sheet = SheetList.GetFirst();
|
|
|
|
sheet != NULL;
|
|
|
|
sheet = SheetList.GetNext() )
|
2009-07-08 15:42:45 +00:00
|
|
|
{
|
2009-11-03 13:26:31 +00:00
|
|
|
SCH_ITEM* item = (SCH_ITEM*) sheet->LastDrawList();
|
2009-07-08 15:42:45 +00:00
|
|
|
while( item && NotFound )
|
|
|
|
{
|
|
|
|
if( item == marker )
|
|
|
|
{
|
|
|
|
NotFound = FALSE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
item = item->Next();
|
|
|
|
}
|
|
|
|
|
|
|
|
if( NotFound == false )
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if( NotFound ) // Error
|
|
|
|
{
|
|
|
|
wxMessageBox( wxT( "OnLeftDClickMarkersList() error: Marker Not Found" ) );
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( sheet != m_Parent->GetSheet() )
|
|
|
|
{
|
|
|
|
sheet->LastScreen()->SetZoom( m_Parent->GetScreen()->GetZoom() );
|
|
|
|
*m_Parent->m_CurrentSheet = *sheet;
|
2009-11-03 13:26:31 +00:00
|
|
|
ActiveScreen = m_Parent->m_CurrentSheet->LastScreen();
|
2009-07-08 15:42:45 +00:00
|
|
|
m_Parent->m_CurrentSheet->UpdateAllScreenReferences();
|
|
|
|
}
|
|
|
|
|
|
|
|
sheet->LastScreen()->m_Curseur = pos;
|
|
|
|
m_Parent->Recadre_Trace( true );
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-11-03 13:26:31 +00:00
|
|
|
/* Build or rebuild the panel showing the ERC conflict matrix
|
2009-07-03 18:25:06 +00:00
|
|
|
*/
|
2009-12-02 21:44:03 +00:00
|
|
|
void DIALOG_ERC::ReBuildMatrixPanel()
|
|
|
|
{
|
2009-07-03 18:25:06 +00:00
|
|
|
int ii, jj, event_id, text_height;
|
|
|
|
wxPoint pos, BoxMatrixPosition;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-07-03 18:25:06 +00:00
|
|
|
#define BITMAP_SIZE 19
|
|
|
|
int bitmap_size = BITMAP_SIZE;
|
|
|
|
wxStaticText* text;
|
|
|
|
int x, y;
|
|
|
|
wxSize BoxMatrixMinSize;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-07-03 18:25:06 +00:00
|
|
|
if( !DiagErcTableInit )
|
|
|
|
{
|
|
|
|
memcpy( DiagErc, DefaultDiagErc, sizeof(DefaultDiagErc) );
|
|
|
|
DiagErcTableInit = TRUE;
|
|
|
|
}
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-11-03 13:26:31 +00:00
|
|
|
// Get the current text size: this is a dummy text.
|
|
|
|
text = new wxStaticText( m_PanelERCOptions, -1, wxT( "W" ), pos );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-07-03 18:25:06 +00:00
|
|
|
text_height = text->GetRect().GetHeight();
|
|
|
|
bitmap_size = MAX( bitmap_size, text_height );
|
|
|
|
SAFE_DELETE( text );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-07-03 18:25:06 +00:00
|
|
|
// compute the Y pos interval:
|
|
|
|
BoxMatrixMinSize.y = ( bitmap_size * (PIN_NMAX + 1) ) + 5;
|
|
|
|
GetSizer()->Fit( this );
|
|
|
|
GetSizer()->SetSizeHints( this );
|
|
|
|
pos = m_MatrixSizer->GetPosition();
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-07-03 18:25:06 +00:00
|
|
|
// Size computation is not made in constructor, in some wxWidgets version,
|
|
|
|
// and m_BoxSizerForERC_Opt position is always 0,0. and we can't use it
|
|
|
|
pos.x = MAX( pos.x, 5 );
|
|
|
|
pos.y = MAX( pos.y, m_ResetOptButton->GetRect().GetHeight() + 30 );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-07-03 18:25:06 +00:00
|
|
|
BoxMatrixPosition = pos;
|
|
|
|
|
|
|
|
pos.y += text_height;
|
|
|
|
|
|
|
|
if( m_Initialized == FALSE )
|
|
|
|
{
|
|
|
|
for( ii = 0; ii < PIN_NMAX; ii++ )
|
|
|
|
{
|
|
|
|
y = pos.y + (ii * bitmap_size);
|
2009-11-03 13:26:31 +00:00
|
|
|
text = new wxStaticText( m_PanelERCOptions, -1, CommentERC_H[ii],
|
|
|
|
wxPoint( 5, y ) );
|
2009-07-03 18:25:06 +00:00
|
|
|
|
|
|
|
x = text->GetRect().GetRight();
|
|
|
|
pos.x = MAX( pos.x, x );
|
|
|
|
}
|
|
|
|
|
|
|
|
pos.x += 5;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
pos = m_ButtonList[0][0]->GetPosition();
|
|
|
|
|
|
|
|
for( ii = 0; ii < PIN_NMAX; ii++ )
|
|
|
|
{
|
|
|
|
y = pos.y + (ii * bitmap_size);
|
|
|
|
for( jj = 0; jj <= ii; jj++ )
|
|
|
|
{
|
|
|
|
int diag = DiagErc[ii][jj];
|
|
|
|
x = pos.x + (jj * bitmap_size);
|
|
|
|
if( (ii == jj) && !m_Initialized )
|
|
|
|
{
|
|
|
|
wxPoint txtpos;
|
2009-11-03 13:26:31 +00:00
|
|
|
txtpos.x = x + 6;
|
|
|
|
txtpos.y = y - bitmap_size;
|
|
|
|
text = new wxStaticText( m_PanelERCOptions,
|
|
|
|
-1,
|
|
|
|
CommentERC_V[ii],
|
|
|
|
txtpos );
|
|
|
|
|
|
|
|
BoxMatrixMinSize.x = MAX( BoxMatrixMinSize.x,
|
|
|
|
text->GetRect().GetRight() );
|
2009-07-03 18:25:06 +00:00
|
|
|
}
|
2009-11-03 13:26:31 +00:00
|
|
|
event_id = ID_MATRIX_0 + ii + ( jj * PIN_NMAX );
|
2009-07-03 18:25:06 +00:00
|
|
|
delete m_ButtonList[ii][jj];
|
|
|
|
|
|
|
|
switch( diag )
|
|
|
|
{
|
|
|
|
case OK:
|
|
|
|
m_ButtonList[ii][jj] = new wxBitmapButton( m_PanelERCOptions,
|
2009-11-03 13:26:31 +00:00
|
|
|
event_id,
|
|
|
|
wxBitmap( erc_green_xpm ),
|
|
|
|
wxPoint( x, y ) );
|
2009-07-03 18:25:06 +00:00
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WAR:
|
|
|
|
m_ButtonList[ii][jj] = new wxBitmapButton( m_PanelERCOptions,
|
2009-11-03 13:26:31 +00:00
|
|
|
event_id,
|
|
|
|
wxBitmap( warning_xpm ),
|
|
|
|
wxPoint( x, y ) );
|
2009-07-03 18:25:06 +00:00
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ERR:
|
|
|
|
m_ButtonList[ii][jj] = new wxBitmapButton( m_PanelERCOptions,
|
2009-11-03 13:26:31 +00:00
|
|
|
event_id,
|
|
|
|
wxBitmap( error_xpm ),
|
|
|
|
wxPoint( x, y ) );
|
2009-07-03 18:25:06 +00:00
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if( !m_Initialized )
|
|
|
|
{
|
|
|
|
BoxMatrixMinSize.x += 5;
|
|
|
|
m_MatrixSizer->SetMinSize( BoxMatrixMinSize );
|
|
|
|
BoxMatrixMinSize.y += BoxMatrixPosition.y;
|
|
|
|
m_PanelMatrixSizer->SetMinSize( BoxMatrixMinSize );
|
|
|
|
}
|
|
|
|
m_Initialized = TRUE;
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
2009-07-03 18:25:06 +00:00
|
|
|
|
2009-07-07 17:50:02 +00:00
|
|
|
|
|
|
|
/** Function DisplayERC_MarkersList
|
|
|
|
* read the schematic and display the list of ERC markers
|
|
|
|
*/
|
|
|
|
void DIALOG_ERC::DisplayERC_MarkersList()
|
|
|
|
{
|
2009-12-02 21:44:03 +00:00
|
|
|
SCH_SHEET_LIST SheetList;
|
2009-07-07 17:50:02 +00:00
|
|
|
|
2009-07-08 18:06:11 +00:00
|
|
|
m_MarkersList->ClearList();
|
2009-07-08 15:42:45 +00:00
|
|
|
|
2009-12-02 21:44:03 +00:00
|
|
|
for( SCH_SHEET_PATH* Sheet = SheetList.GetFirst();
|
2009-11-03 13:26:31 +00:00
|
|
|
Sheet != NULL;
|
|
|
|
Sheet = SheetList.GetNext() )
|
2009-07-07 17:50:02 +00:00
|
|
|
{
|
|
|
|
SCH_ITEM* DrawStruct = Sheet->LastDrawList();
|
|
|
|
for( ; DrawStruct != NULL; DrawStruct = DrawStruct->Next() )
|
|
|
|
{
|
2009-12-02 21:44:03 +00:00
|
|
|
if( DrawStruct->Type() != TYPE_SCH_MARKER )
|
2009-07-07 17:50:02 +00:00
|
|
|
continue;
|
|
|
|
|
2009-12-02 21:44:03 +00:00
|
|
|
SCH_MARKER* Marker = (SCH_MARKER*) DrawStruct;
|
2009-07-07 17:50:02 +00:00
|
|
|
if( Marker->GetMarkerType() != MARK_ERC )
|
|
|
|
continue;
|
|
|
|
|
|
|
|
/* Display diag */
|
2009-07-08 15:42:45 +00:00
|
|
|
|
|
|
|
// wxString msg;
|
2009-11-03 13:26:31 +00:00
|
|
|
// msg.Printf( _( "<b>sheet %s</b><ul>\n" ),
|
|
|
|
// Sheet->PathHumanReadable().GetData() );
|
2009-07-08 15:42:45 +00:00
|
|
|
// msg += Marker->GetReporter().ShowHtml();
|
2009-07-08 18:06:11 +00:00
|
|
|
// m_MarkersList->Append( msg );
|
|
|
|
m_MarkersList->AppendToList( Marker );
|
2009-07-07 17:50:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-11-03 13:26:31 +00:00
|
|
|
/* Resets the default values of the ERC matrix.
|
2009-07-07 17:50:02 +00:00
|
|
|
*/
|
2009-12-02 21:44:03 +00:00
|
|
|
void DIALOG_ERC::ResetDefaultERCDiag( wxCommandEvent& event )
|
|
|
|
{
|
2009-07-07 17:50:02 +00:00
|
|
|
memcpy( DiagErc, DefaultDiagErc, sizeof(DiagErc) );
|
|
|
|
ReBuildMatrixPanel();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Change the error level for the pressed button, on the matrix table
|
|
|
|
*/
|
2009-12-02 21:44:03 +00:00
|
|
|
void DIALOG_ERC::ChangeErrorLevel( wxCommandEvent& event )
|
|
|
|
{
|
2009-07-07 17:50:02 +00:00
|
|
|
int id, level, ii, x, y;
|
|
|
|
wxBitmapButton* Butt;
|
|
|
|
const char** new_bitmap_xpm = NULL;
|
|
|
|
wxPoint pos;
|
|
|
|
|
|
|
|
id = event.GetId();
|
|
|
|
ii = id - ID_MATRIX_0;
|
|
|
|
Butt = (wxBitmapButton*) event.GetEventObject();
|
|
|
|
pos = Butt->GetPosition();
|
|
|
|
|
|
|
|
x = ii / PIN_NMAX; y = ii % PIN_NMAX;
|
|
|
|
|
|
|
|
level = DiagErc[y][x];
|
|
|
|
|
|
|
|
switch( level )
|
|
|
|
{
|
|
|
|
case OK:
|
|
|
|
level = WAR;
|
|
|
|
new_bitmap_xpm = warning_xpm;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WAR:
|
|
|
|
level = ERR;
|
|
|
|
new_bitmap_xpm = error_xpm;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ERR:
|
|
|
|
level = OK;
|
|
|
|
new_bitmap_xpm = erc_green_xpm;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( new_bitmap_xpm )
|
|
|
|
{
|
|
|
|
delete Butt;
|
|
|
|
Butt = new wxBitmapButton( m_PanelERCOptions, id,
|
|
|
|
wxBitmap( new_bitmap_xpm ), pos );
|
|
|
|
|
|
|
|
m_ButtonList[y][x] = Butt;
|
|
|
|
DiagErc[y][x] = DiagErc[x][y] = level;
|
|
|
|
}
|
|
|
|
}
|