mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Libedit: refresh display after creating/moving a graphic item
This commit is contained in:
parent
44d416cafc
commit
7bba7a884a
@ -145,7 +145,7 @@ LIB_ITEM* LIB_EDIT_FRAME::CreateGraphicItem( LIB_PART* LibEntry, wxDC* DC )
|
|||||||
|
|
||||||
auto view = static_cast<SCH_DRAW_PANEL*>(m_canvas)->GetView();
|
auto view = static_cast<SCH_DRAW_PANEL*>(m_canvas)->GetView();
|
||||||
view->ShowPreview( true );
|
view->ShowPreview( true );
|
||||||
|
|
||||||
switch( GetToolId() )
|
switch( GetToolId() )
|
||||||
{
|
{
|
||||||
case ID_LIBEDIT_BODY_ARC_BUTT:
|
case ID_LIBEDIT_BODY_ARC_BUTT:
|
||||||
@ -237,11 +237,11 @@ void LIB_EDIT_FRAME::GraphicItemBeginDraw( wxDC* DC )
|
|||||||
|
|
||||||
auto view = static_cast<SCH_DRAW_PANEL*>(m_canvas)->GetView();
|
auto view = static_cast<SCH_DRAW_PANEL*>(m_canvas)->GetView();
|
||||||
view->ShowPreview( true );
|
view->ShowPreview( true );
|
||||||
|
|
||||||
|
|
||||||
if( GetDrawItem()->ContinueEdit( pos ) )
|
if( GetDrawItem()->ContinueEdit( pos ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
EndDrawGraphicItem( DC );
|
EndDrawGraphicItem( DC );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,7 +261,7 @@ static void RedrawWhileMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx
|
|||||||
auto p = aPanel->GetParent()->GetCrossHairPosition( true );
|
auto p = aPanel->GetParent()->GetCrossHairPosition( true );
|
||||||
|
|
||||||
item->CalcEdit( p );
|
item->CalcEdit( p );
|
||||||
|
|
||||||
view->ClearPreview();
|
view->ClearPreview();
|
||||||
view->AddToPreview( item, false );
|
view->AddToPreview( item, false );
|
||||||
}
|
}
|
||||||
@ -357,7 +357,7 @@ void LIB_EDIT_FRAME::EndDrawGraphicItem( wxDC* DC )
|
|||||||
SetDrawItem( NULL );
|
SetDrawItem( NULL );
|
||||||
|
|
||||||
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();
|
||||||
|
|
||||||
DBG(printf("end: pos %d %d\n", item->GetPosition().x, item->GetPosition().y );)
|
DBG(printf("end: pos %d %d\n", item->GetPosition().x, item->GetPosition().y );)
|
||||||
@ -367,4 +367,7 @@ void LIB_EDIT_FRAME::EndDrawGraphicItem( wxDC* DC )
|
|||||||
|
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RebuildView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user