Fix dissappearance of moved items.
This commit is contained in:
parent
5fd20ee786
commit
38f38b16c0
|
@ -35,8 +35,6 @@
|
|||
#include <base_struct.h>
|
||||
#include <base_screen.h>
|
||||
#include <legacy_gal/class_drawpanel.h>
|
||||
#include <class_draw_panel_gal.h>
|
||||
#include <view/view.h>
|
||||
#include <confirm.h>
|
||||
#include <block_commande.h>
|
||||
|
||||
|
@ -154,16 +152,6 @@ 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()
|
||||
{
|
||||
m_items.ClearItemsList();
|
||||
|
|
|
@ -387,8 +387,6 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
|
|||
|
||||
if( !nextcmd )
|
||||
{
|
||||
block->UpdateItems( GetCanvas() );
|
||||
|
||||
block->SetState( STATE_NO_BLOCK );
|
||||
block->SetCommand( BLOCK_IDLE );
|
||||
GetScreen()->SetCurItem( NULL );
|
||||
|
|
|
@ -89,6 +89,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
case SCH_NO_CONNECT_T:
|
||||
addCurrentItemToList();
|
||||
GetCanvas()->GetView()->ClearPreview();
|
||||
GetCanvas()->GetView()->ClearHiddenFlags();
|
||||
return;
|
||||
|
||||
case SCH_LINE_T: // May already be drawing segment.
|
||||
|
|
|
@ -139,11 +139,6 @@ public:
|
|||
*/
|
||||
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
|
||||
* deletes only the list of EDA_ITEM * pointers, AND the data printed
|
||||
|
|
Loading…
Reference in New Issue