Implement GAL refresh for a bunch of operations.
This commit is contained in:
parent
afeebc8944
commit
d7178c7833
|
@ -35,6 +35,8 @@
|
||||||
#include <base_struct.h>
|
#include <base_struct.h>
|
||||||
#include <base_screen.h>
|
#include <base_screen.h>
|
||||||
#include <legacy_gal/class_drawpanel.h>
|
#include <legacy_gal/class_drawpanel.h>
|
||||||
|
#include <class_draw_panel_gal.h>
|
||||||
|
#include <view/view.h>
|
||||||
#include <confirm.h>
|
#include <confirm.h>
|
||||||
#include <block_commande.h>
|
#include <block_commande.h>
|
||||||
|
|
||||||
|
@ -152,6 +154,16 @@ void BLOCK_SELECTOR::InitData( EDA_DRAW_PANEL* aPanel, const wxPoint& startpos )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void BLOCK_SELECTOR::UpdateItems( EDA_DRAW_PANEL* aPanel )
|
||||||
|
{
|
||||||
|
// ugly, but temporary
|
||||||
|
auto canvas = dynamic_cast<EDA_DRAW_PANEL_GAL*>( aPanel );
|
||||||
|
|
||||||
|
for( size_t i = 0; i < m_items.GetCount(); i++ )
|
||||||
|
canvas->GetView()->Update( m_items.GetPickedItem( i ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void BLOCK_SELECTOR::ClearItemsList()
|
void BLOCK_SELECTOR::ClearItemsList()
|
||||||
{
|
{
|
||||||
m_items.ClearItemsList();
|
m_items.ClearItemsList();
|
||||||
|
|
|
@ -244,15 +244,13 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
|
||||||
|
|
||||||
block->ClearItemsList();
|
block->ClearItemsList();
|
||||||
GetScreen()->TestDanglingEnds();
|
GetScreen()->TestDanglingEnds();
|
||||||
m_canvas->Refresh();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_DRAG:
|
case BLOCK_DRAG:
|
||||||
case BLOCK_DRAG_ITEM: // Drag from a drag command
|
case BLOCK_DRAG_ITEM: // Drag from a drag command
|
||||||
case BLOCK_MOVE:
|
case BLOCK_MOVE:
|
||||||
case BLOCK_DUPLICATE:
|
case BLOCK_DUPLICATE:
|
||||||
if( block->GetCommand() == BLOCK_DRAG_ITEM &&
|
if( block->GetCommand() == BLOCK_DRAG_ITEM && GetScreen()->GetCurItem() != NULL )
|
||||||
GetScreen()->GetCurItem() != NULL )
|
|
||||||
{
|
{
|
||||||
// This is a drag command, not a mouse block command
|
// This is a drag command, not a mouse block command
|
||||||
// Only this item is put in list
|
// Only this item is put in list
|
||||||
|
@ -313,7 +311,6 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
|
||||||
}
|
}
|
||||||
|
|
||||||
GetScreen()->TestDanglingEnds();
|
GetScreen()->TestDanglingEnds();
|
||||||
m_canvas->Refresh();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_COPY: // Save a copy of items in paste buffer
|
case BLOCK_COPY: // Save a copy of items in paste buffer
|
||||||
|
@ -356,7 +353,6 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
|
||||||
|
|
||||||
block->ClearItemsList();
|
block->ClearItemsList();
|
||||||
GetScreen()->TestDanglingEnds();
|
GetScreen()->TestDanglingEnds();
|
||||||
m_canvas->Refresh();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_MIRROR_Y:
|
case BLOCK_MIRROR_Y:
|
||||||
|
@ -377,7 +373,6 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
|
||||||
|
|
||||||
block->ClearItemsList();
|
block->ClearItemsList();
|
||||||
GetScreen()->TestDanglingEnds();
|
GetScreen()->TestDanglingEnds();
|
||||||
m_canvas->Refresh();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -390,8 +385,10 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
|
||||||
GetScreen()->ClearDrawingState();
|
GetScreen()->ClearDrawingState();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ! nextcmd )
|
if( !nextcmd )
|
||||||
{
|
{
|
||||||
|
block->UpdateItems( GetCanvas() );
|
||||||
|
|
||||||
block->SetState( STATE_NO_BLOCK );
|
block->SetState( STATE_NO_BLOCK );
|
||||||
block->SetCommand( BLOCK_IDLE );
|
block->SetCommand( BLOCK_IDLE );
|
||||||
GetScreen()->SetCurItem( NULL );
|
GetScreen()->SetCurItem( NULL );
|
||||||
|
@ -406,7 +403,6 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
|
||||||
view->ShowSelectionArea( false );
|
view->ShowSelectionArea( false );
|
||||||
view->ClearHiddenFlags();
|
view->ClearHiddenFlags();
|
||||||
|
|
||||||
|
|
||||||
return nextcmd;
|
return nextcmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -382,7 +382,7 @@ void LIB_EDIT_FRAME::OnShowElectricalType( wxCommandEvent& event )
|
||||||
|
|
||||||
// Update canvas
|
// Update canvas
|
||||||
GetRenderSettings()->m_ShowPinsElectricalType = m_showPinElectricalTypeName;
|
GetRenderSettings()->m_ShowPinsElectricalType = m_showPinElectricalTypeName;
|
||||||
GetCanvas()->GetView()->MarkDirty();
|
GetCanvas()->GetView()->UpdateAllItems( KIGFX::REPAINT );
|
||||||
GetCanvas()->Refresh();
|
GetCanvas()->Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -574,11 +574,7 @@ void LIB_EDIT_FRAME::OnSelectPart( wxCommandEvent& event )
|
||||||
m_lastDrawItem = NULL;
|
m_lastDrawItem = NULL;
|
||||||
m_unit = i + 1;
|
m_unit = i + 1;
|
||||||
|
|
||||||
// Update canvas
|
RebuildView();
|
||||||
GetRenderSettings()->m_ShowUnit = m_unit;
|
|
||||||
GetCanvas()->GetView()->MarkDirty();
|
|
||||||
GetCanvas()->Refresh();
|
|
||||||
|
|
||||||
DisplayCmpDoc();
|
DisplayCmpDoc();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -632,10 +628,7 @@ void LIB_EDIT_FRAME::OnSelectBodyStyle( wxCommandEvent& event )
|
||||||
|
|
||||||
m_lastDrawItem = NULL;
|
m_lastDrawItem = NULL;
|
||||||
|
|
||||||
// Update canvas
|
RebuildView();
|
||||||
GetRenderSettings()->m_ShowConvert = m_convert;
|
|
||||||
GetCanvas()->GetView()->MarkDirty();
|
|
||||||
GetCanvas()->Refresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -818,7 +811,6 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
|
|
||||||
GlobalSetPins( (LIB_PIN*) item, id );
|
GlobalSetPins( (LIB_PIN*) item, id );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
m_canvas->Refresh();
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1073,7 +1065,6 @@ void LIB_EDIT_FRAME::OnEditComponentProperties( wxCommandEvent& event )
|
||||||
updateTitle();
|
updateTitle();
|
||||||
DisplayCmpDoc();
|
DisplayCmpDoc();
|
||||||
OnModify();
|
OnModify();
|
||||||
m_canvas->Refresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1197,8 +1188,6 @@ void LIB_EDIT_FRAME::OnRotateItem( wxCommandEvent& aEvent )
|
||||||
if( !item->InEditMode() )
|
if( !item->InEditMode() )
|
||||||
item->ClearFlags();
|
item->ClearFlags();
|
||||||
|
|
||||||
m_canvas->Refresh();
|
|
||||||
|
|
||||||
if( GetToolId() == ID_NO_TOOL_SELECTED )
|
if( GetToolId() == ID_NO_TOOL_SELECTED )
|
||||||
m_lastDrawItem = NULL;
|
m_lastDrawItem = NULL;
|
||||||
}
|
}
|
||||||
|
@ -1371,26 +1360,18 @@ void LIB_EDIT_FRAME::deleteItem( wxDC* aDC, LIB_ITEM* aItem )
|
||||||
part->RemoveDrawItem( pin );
|
part->RemoveDrawItem( pin );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_canvas->Refresh();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( m_canvas->IsMouseCaptured() )
|
if( m_canvas->IsMouseCaptured() )
|
||||||
{
|
|
||||||
m_canvas->CallEndMouseCapture( aDC );
|
m_canvas->CallEndMouseCapture( aDC );
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
part->RemoveDrawItem( aItem, m_canvas, aDC );
|
part->RemoveDrawItem( aItem, m_canvas, aDC );
|
||||||
m_canvas->Refresh();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SetDrawItem( NULL );
|
SetDrawItem( NULL );
|
||||||
m_lastDrawItem = NULL;
|
m_lastDrawItem = NULL;
|
||||||
OnModify();
|
OnModify();
|
||||||
RebuildView();
|
|
||||||
m_canvas->CrossHairOn( aDC );
|
m_canvas->CrossHairOn( aDC );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1399,6 +1380,12 @@ void LIB_EDIT_FRAME::OnModify()
|
||||||
{
|
{
|
||||||
GetScreen()->SetModify();
|
GetScreen()->SetModify();
|
||||||
storeCurrentPart();
|
storeCurrentPart();
|
||||||
|
|
||||||
|
// Parts have a small number of view items (compared to a full schematic), and changes
|
||||||
|
// in shared pins, graphic items, etc. can add/remove items from the view. All things
|
||||||
|
// considered, it's safer to just use a big hammer.
|
||||||
|
RebuildView();
|
||||||
|
|
||||||
m_treePane->GetLibTree()->Refresh();
|
m_treePane->GetLibTree()->Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1429,8 +1416,6 @@ void LIB_EDIT_FRAME::OnOpenPinTable( wxCommandEvent& aEvent )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
OnModify();
|
OnModify();
|
||||||
m_canvas->Refresh();
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1716,6 +1701,8 @@ void LIB_EDIT_FRAME::RebuildView()
|
||||||
|
|
||||||
view->HideWorksheet();
|
view->HideWorksheet();
|
||||||
view->ClearHiddenFlags();
|
view->ClearHiddenFlags();
|
||||||
|
|
||||||
|
GetCanvas()->Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
const BOX2I LIB_EDIT_FRAME::GetDocumentExtents() const
|
const BOX2I LIB_EDIT_FRAME::GetDocumentExtents() const
|
||||||
|
|
|
@ -95,8 +95,6 @@ void LIB_EDIT_FRAME::GetComponentFromRedoList( wxCommandEvent& event )
|
||||||
updateTitle();
|
updateTitle();
|
||||||
DisplayCmpDoc();
|
DisplayCmpDoc();
|
||||||
OnModify();
|
OnModify();
|
||||||
m_canvas->Refresh();
|
|
||||||
RebuildView();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -143,6 +141,4 @@ void LIB_EDIT_FRAME::GetComponentFromUndoList( wxCommandEvent& event )
|
||||||
updateTitle();
|
updateTitle();
|
||||||
DisplayCmpDoc();
|
DisplayCmpDoc();
|
||||||
OnModify();
|
OnModify();
|
||||||
m_canvas->Refresh();
|
|
||||||
RebuildView();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include <gr_basic.h>
|
#include <gr_basic.h>
|
||||||
#include <sch_draw_panel.h>
|
#include <sch_draw_panel.h>
|
||||||
#include <confirm.h>
|
#include <confirm.h>
|
||||||
|
#include <sch_view.h>
|
||||||
#include <sch_component.h>
|
#include <sch_component.h>
|
||||||
#include <lib_edit_frame.h>
|
#include <lib_edit_frame.h>
|
||||||
#include <class_library.h>
|
#include <class_library.h>
|
||||||
|
@ -97,7 +97,6 @@ void LIB_EDIT_FRAME::EditField( LIB_FIELD* aField )
|
||||||
SaveCopyInUndoList( parent );
|
SaveCopyInUndoList( parent );
|
||||||
|
|
||||||
dlg.UpdateField( aField );
|
dlg.UpdateField( aField );
|
||||||
m_canvas->Refresh();
|
|
||||||
|
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,6 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
|
||||||
MSG_PANEL_ITEMS items;
|
MSG_PANEL_ITEMS items;
|
||||||
pin->GetMsgPanelInfo( m_UserUnits, items );
|
pin->GetMsgPanelInfo( m_UserUnits, items );
|
||||||
SetMsgPanel( items );
|
SetMsgPanel( items );
|
||||||
m_canvas->Refresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pin->EnableEditMode( false );
|
pin->EnableEditMode( false );
|
||||||
|
@ -169,7 +168,6 @@ static void AbortPinMove( EDA_DRAW_PANEL* aPanel, wxDC* DC )
|
||||||
panel->GetView()->ClearPreview();
|
panel->GetView()->ClearPreview();
|
||||||
panel->GetView()->ClearHiddenFlags();
|
panel->GetView()->ClearHiddenFlags();
|
||||||
|
|
||||||
|
|
||||||
// clear edit flags
|
// clear edit flags
|
||||||
parent->SetDrawItem( NULL );
|
parent->SetDrawItem( NULL );
|
||||||
parent->SetLastDrawItem( NULL );
|
parent->SetLastDrawItem( NULL );
|
||||||
|
@ -271,11 +269,6 @@ void LIB_EDIT_FRAME::PlacePin()
|
||||||
SetDrawItem( NULL );
|
SetDrawItem( NULL );
|
||||||
|
|
||||||
OnModify();
|
OnModify();
|
||||||
m_canvas->Refresh();
|
|
||||||
|
|
||||||
printf("Rebuild %d %d\n", cur_pin->GetPosition().x, cur_pin->GetPosition().y );
|
|
||||||
RebuildView();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -323,10 +316,6 @@ void LIB_EDIT_FRAME::StartMovePin( LIB_ITEM* aItem )
|
||||||
cur_pin->GetMsgPanelInfo( m_UserUnits, items );
|
cur_pin->GetMsgPanelInfo( m_UserUnits, items );
|
||||||
SetMsgPanel( items );
|
SetMsgPanel( items );
|
||||||
m_canvas->SetMouseCapture( DrawMovePin, AbortPinMove );
|
m_canvas->SetMouseCapture( DrawMovePin, AbortPinMove );
|
||||||
|
|
||||||
// Refresh the screen to avoid color artifacts when drawing
|
|
||||||
// the pin in Edit mode and moving it from its start position
|
|
||||||
m_canvas->Refresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -102,8 +102,6 @@ void LIB_EDIT_FRAME::EditGraphicSymbol( wxDC* DC, LIB_ITEM* DrawItem )
|
||||||
MSG_PANEL_ITEMS items;
|
MSG_PANEL_ITEMS items;
|
||||||
DrawItem->GetMsgPanelInfo( m_UserUnits, items );
|
DrawItem->GetMsgPanelInfo( m_UserUnits, items );
|
||||||
SetMsgPanel( items );
|
SetMsgPanel( items );
|
||||||
m_canvas->Refresh();
|
|
||||||
RebuildView();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -369,8 +367,6 @@ void LIB_EDIT_FRAME::EndDrawGraphicItem( wxDC* DC )
|
||||||
|
|
||||||
SetDrawItem( NULL );
|
SetDrawItem( NULL );
|
||||||
|
|
||||||
OnModify();
|
|
||||||
|
|
||||||
m_canvas->SetMouseCapture( NULL, NULL );
|
m_canvas->SetMouseCapture( NULL, NULL );
|
||||||
|
|
||||||
auto view = static_cast<SCH_DRAW_PANEL*>(m_canvas)->GetView();
|
auto view = static_cast<SCH_DRAW_PANEL*>(m_canvas)->GetView();
|
||||||
|
@ -379,7 +375,7 @@ void LIB_EDIT_FRAME::EndDrawGraphicItem( wxDC* DC )
|
||||||
|
|
||||||
view->ClearHiddenFlags();
|
view->ClearHiddenFlags();
|
||||||
view->ClearPreview();
|
view->ClearPreview();
|
||||||
RebuildView();
|
|
||||||
|
|
||||||
|
OnModify();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,7 +146,6 @@ void LIB_EDIT_FRAME::LoadOneSymbol()
|
||||||
part->RemoveDuplicateDrawItems();
|
part->RemoveDuplicateDrawItems();
|
||||||
|
|
||||||
OnModify();
|
OnModify();
|
||||||
m_canvas->Refresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -224,9 +223,5 @@ void LIB_EDIT_FRAME::PlaceAnchor()
|
||||||
wxPoint offset( -cross_hair.x, cross_hair.y );
|
wxPoint offset( -cross_hair.x, cross_hair.y );
|
||||||
part->SetOffset( offset );
|
part->SetOffset( offset );
|
||||||
OnModify();
|
OnModify();
|
||||||
|
|
||||||
// Redraw the symbol
|
|
||||||
RedrawScreen( wxPoint( 0, 0 ), true );
|
|
||||||
m_canvas->Refresh();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include <sch_line.h>
|
#include <sch_line.h>
|
||||||
#include <sch_edit_frame.h>
|
#include <sch_edit_frame.h>
|
||||||
#include <netlist_object.h>
|
#include <netlist_object.h>
|
||||||
|
#include <sch_view.h>
|
||||||
|
|
||||||
#include <dialogs/dialog_edit_line_style.h>
|
#include <dialogs/dialog_edit_line_style.h>
|
||||||
|
|
||||||
|
@ -795,7 +796,10 @@ int SCH_EDIT_FRAME::EditLine( SCH_LINE* aLine, bool aRedraw )
|
||||||
return wxID_CANCEL;
|
return wxID_CANCEL;
|
||||||
|
|
||||||
if( aRedraw )
|
if( aRedraw )
|
||||||
m_canvas->Refresh();
|
{
|
||||||
|
GetCanvas()->GetView()->Update( aLine );
|
||||||
|
GetCanvas()->Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
return wxID_OK;
|
return wxID_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -888,8 +888,6 @@ void SCH_EDIT_FRAME::OnRotate( wxCommandEvent& aEvent )
|
||||||
if( m_autoplaceFields )
|
if( m_autoplaceFields )
|
||||||
component->AutoAutoplaceFields( GetScreen() );
|
component->AutoAutoplaceFields( GetScreen() );
|
||||||
|
|
||||||
m_canvas->Refresh();
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -899,7 +897,6 @@ void SCH_EDIT_FRAME::OnRotate( wxCommandEvent& aEvent )
|
||||||
case SCH_HIERARCHICAL_LABEL_T:
|
case SCH_HIERARCHICAL_LABEL_T:
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
ChangeTextOrient( (SCH_TEXT*) item );
|
ChangeTextOrient( (SCH_TEXT*) item );
|
||||||
m_canvas->Refresh();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SCH_FIELD_T:
|
case SCH_FIELD_T:
|
||||||
|
@ -911,7 +908,6 @@ void SCH_EDIT_FRAME::OnRotate( wxCommandEvent& aEvent )
|
||||||
SCH_COMPONENT *parent = static_cast<SCH_COMPONENT*>( item->GetParent() );
|
SCH_COMPONENT *parent = static_cast<SCH_COMPONENT*>( item->GetParent() );
|
||||||
parent->ClearFieldsAutoplaced();
|
parent->ClearFieldsAutoplaced();
|
||||||
}
|
}
|
||||||
m_canvas->Refresh();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SCH_BITMAP_T:
|
case SCH_BITMAP_T:
|
||||||
|
@ -942,6 +938,7 @@ void SCH_EDIT_FRAME::OnRotate( wxCommandEvent& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
GetCanvas()->GetView()->Update( item );
|
GetCanvas()->GetView()->Update( item );
|
||||||
|
GetCanvas()->Refresh();
|
||||||
|
|
||||||
if( item->GetFlags() == 0 )
|
if( item->GetFlags() == 0 )
|
||||||
screen->SetCurItem( NULL );
|
screen->SetCurItem( NULL );
|
||||||
|
@ -1101,6 +1098,7 @@ void SCH_EDIT_FRAME::OnEditItem( wxCommandEvent& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
GetCanvas()->GetView()->Update( item );
|
GetCanvas()->GetView()->Update( item );
|
||||||
|
GetCanvas()->Refresh();
|
||||||
|
|
||||||
if( item->GetFlags() == 0 )
|
if( item->GetFlags() == 0 )
|
||||||
screen->SetCurItem( NULL );
|
screen->SetCurItem( NULL );
|
||||||
|
@ -1246,8 +1244,6 @@ void SCH_EDIT_FRAME::OnOrient( wxCommandEvent& aEvent )
|
||||||
if( m_autoplaceFields )
|
if( m_autoplaceFields )
|
||||||
component->AutoAutoplaceFields( GetScreen() );
|
component->AutoAutoplaceFields( GetScreen() );
|
||||||
|
|
||||||
m_canvas->Refresh();
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1273,6 +1269,7 @@ void SCH_EDIT_FRAME::OnOrient( wxCommandEvent& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
GetCanvas()->GetView()->Update( item );
|
GetCanvas()->GetView()->Update( item );
|
||||||
|
GetCanvas()->Refresh();
|
||||||
|
|
||||||
if( item->GetFlags() == 0 )
|
if( item->GetFlags() == 0 )
|
||||||
screen->SetCurItem( NULL );
|
screen->SetCurItem( NULL );
|
||||||
|
|
|
@ -32,7 +32,8 @@
|
||||||
#include <sch_edit_frame.h>
|
#include <sch_edit_frame.h>
|
||||||
#include <kiface_i.h>
|
#include <kiface_i.h>
|
||||||
#include <bitmaps.h>
|
#include <bitmaps.h>
|
||||||
|
#include <sch_view.h>
|
||||||
|
#include <sch_painter.h>
|
||||||
#include <general.h>
|
#include <general.h>
|
||||||
#include <hotkeys.h>
|
#include <hotkeys.h>
|
||||||
#include <eeschema_id.h>
|
#include <eeschema_id.h>
|
||||||
|
@ -328,10 +329,15 @@ void SCH_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
|
||||||
switch( id )
|
switch( id )
|
||||||
{
|
{
|
||||||
case ID_TB_OPTIONS_HIDDEN_PINS:
|
case ID_TB_OPTIONS_HIDDEN_PINS:
|
||||||
|
{
|
||||||
m_showAllPins = !m_showAllPins;
|
m_showAllPins = !m_showAllPins;
|
||||||
|
|
||||||
if( m_canvas )
|
auto painter = static_cast<KIGFX::SCH_PAINTER*>( GetCanvas()->GetView()->GetPainter() );
|
||||||
m_canvas->Refresh();
|
painter->GetSettings()->m_ShowHiddenPins = m_showAllPins;
|
||||||
|
|
||||||
|
GetCanvas()->GetView()->UpdateAllItems( KIGFX::REPAINT );
|
||||||
|
GetCanvas()->Refresh();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_TB_OPTIONS_BUS_WIRES_ORIENT:
|
case ID_TB_OPTIONS_BUS_WIRES_ORIENT:
|
||||||
|
|
|
@ -139,6 +139,11 @@ public:
|
||||||
*/
|
*/
|
||||||
void PushItem( ITEM_PICKER& aItem );
|
void PushItem( ITEM_PICKER& aItem );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mark the list of items for update when the view is next refreshed.
|
||||||
|
*/
|
||||||
|
void UpdateItems( EDA_DRAW_PANEL* aPanel );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function ClearListAndDeleteItems
|
* Function ClearListAndDeleteItems
|
||||||
* deletes only the list of EDA_ITEM * pointers, AND the data printed
|
* deletes only the list of EDA_ITEM * pointers, AND the data printed
|
||||||
|
|
Loading…
Reference in New Issue