fixed post-rebase issues
This commit is contained in:
parent
c661c30f68
commit
3f7c5a0845
|
@ -1061,16 +1061,13 @@ void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags )
|
|||
int layers[VIEW_MAX_LAYERS], layers_count;
|
||||
aItem->ViewGetLayers( layers, layers_count );
|
||||
|
||||
printf("invlidate %p", aItem);
|
||||
|
||||
// Iterate through layers used by the item and recache it immediately
|
||||
// Iterate through layers used by the item and recache it immediately
|
||||
for( int i = 0; i < layers_count; ++i )
|
||||
{
|
||||
int layerId = layers[i];
|
||||
|
||||
if( IsCached( layerId ) )
|
||||
{
|
||||
printf("updateGeom %p flg %d\n", aItem, aUpdateFlags );
|
||||
if( aUpdateFlags & ( GEOMETRY | LAYERS ) )
|
||||
updateItemGeometry( aItem, layerId );
|
||||
else if( aUpdateFlags & COLOR )
|
||||
|
@ -1136,8 +1133,6 @@ void VIEW::updateItemGeometry( VIEW_ITEM* aItem, int aLayer )
|
|||
group = m_gal->BeginGroup();
|
||||
viewData->setGroup( aLayer, group );
|
||||
|
||||
printf("upadteGeom2: %p\n", aItem );
|
||||
|
||||
if( !m_painter->Draw( static_cast<EDA_ITEM*>( aItem ), aLayer ) )
|
||||
aItem->ViewDraw( aLayer, this ); // Alternative drawing method
|
||||
|
||||
|
@ -1345,6 +1340,7 @@ void VIEW::Update( VIEW_ITEM *aItem, int aUpdateFlags )
|
|||
return;
|
||||
|
||||
assert( aUpdateFlags != NONE );
|
||||
|
||||
bool firstTime = (viewData->m_requiredUpdate == NONE);
|
||||
|
||||
viewData->m_requiredUpdate |= aUpdateFlags;
|
||||
|
@ -1361,9 +1357,7 @@ void VIEW::MarkForUpdate( VIEW_ITEM* aItem )
|
|||
{
|
||||
auto viewData = aItem->viewPrivData();
|
||||
|
||||
printf("MarkForUpdate %p\n", aItem);
|
||||
|
||||
assert( viewData->m_requiredUpdate != NONE );
|
||||
assert( viewData->m_requiredUpdate != NONE );
|
||||
|
||||
for ( auto item : m_needsUpdate )
|
||||
assert(item != aItem);
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
|
||||
void ViewDraw( int aLayer, VIEW* aView ) const override;
|
||||
|
||||
void ViewGetLayers( int aLayers[], int& aCount ) constm override
|
||||
void ViewGetLayers( int aLayers[], int& aCount ) const override
|
||||
{
|
||||
aLayers[0] = ITEM_GAL_LAYER( GP_OVERLAY );
|
||||
aCount = 1;
|
||||
|
|
|
@ -90,13 +90,12 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry)
|
|||
|
||||
assert( ent.m_item->Type() == PCB_MODULE_T );
|
||||
assert( ent.m_copy->Type() == PCB_MODULE_T );
|
||||
|
||||
if ( aCreateUndoEntry )
|
||||
{
|
||||
ITEM_PICKER itemWrapper( ent.m_item, UR_CHANGED );
|
||||
itemWrapper.SetLink( ent.m_copy );
|
||||
undoList.PushItem( itemWrapper );
|
||||
frame->SaveCopyInUndoList( undoList, UR_CHANGED );
|
||||
ITEM_PICKER itemWrapper( ent.m_item, UR_CHANGED );
|
||||
itemWrapper.SetLink( ent.m_copy );
|
||||
undoList.PushItem( itemWrapper );
|
||||
frame->SaveCopyInUndoList( undoList, UR_CHANGED );
|
||||
}
|
||||
|
||||
savedModules.insert( ent.m_item );
|
||||
|
@ -111,7 +110,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry)
|
|||
if( !m_editModules )
|
||||
{
|
||||
if ( aCreateUndoEntry )
|
||||
undoList.PushItem( ITEM_PICKER( boardItem, UR_NEW ) );
|
||||
undoList.PushItem( ITEM_PICKER( boardItem, UR_NEW ) );
|
||||
|
||||
if( !( changeFlags & CHT_DONE ) )
|
||||
board->Add( boardItem );
|
||||
|
@ -256,7 +255,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry)
|
|||
if ( boardItem->Type() == PCB_MODULE_T )
|
||||
{
|
||||
MODULE* module = static_cast<MODULE*>( boardItem );
|
||||
module->RunOnChildren( boost::bind( &KIGFX::VIEW::Update, view, _1 ) );
|
||||
module->RunOnChildren( [&view] ( BOARD_ITEM *aItem ){ view->Update( aItem ); } );
|
||||
}
|
||||
|
||||
view->Update ( boardItem );
|
||||
|
|
|
@ -566,7 +566,7 @@ public:
|
|||
virtual void ViewGetLayers( int aLayers[], int& aCount ) const override;
|
||||
|
||||
/// @copydoc VIEW_ITEM::ViewGetLOD()
|
||||
virtual unsigned int ViewGetLOD( int aLayer, KIGFX::VIEW* aView );
|
||||
virtual unsigned int ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const override;
|
||||
|
||||
/// @copydoc VIEW_ITEM::ViewBBox()
|
||||
virtual const BOX2I ViewBBox() const override;
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
#include <dialog_global_edit_tracks_and_vias.h>
|
||||
|
||||
#include <view/view.h>
|
||||
|
||||
/**
|
||||
* DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS, derived from DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS_BASE_BASE
|
||||
|
@ -260,7 +261,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::OnOkClick( wxCommandEvent& event )
|
|||
if( m_parent->IsGalCanvasActive() )
|
||||
{
|
||||
for( TRACK* track = m_parent->GetBoard()->m_Track; track != NULL; track = track->Next() )
|
||||
track->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY );
|
||||
m_parent->GetGalCanvas()->GetView()->Update(track, KIGFX::GEOMETRY );
|
||||
}
|
||||
else
|
||||
m_parent->GetCanvas()->Refresh();
|
||||
|
|
|
@ -239,7 +239,8 @@ void PCB_EDIT_FRAME::Edit_Track_Width( wxDC* aDC, TRACK* aTrackSegment )
|
|||
segm = (TRACK*) itemsListPicker.GetPickedItem( ii );
|
||||
segm->Draw( m_canvas, aDC, GR_OR ); // Display new track shape
|
||||
|
||||
segm->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY );
|
||||
// fixme: commit!
|
||||
// segm->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY );
|
||||
}
|
||||
|
||||
m_canvas->CrossHairOn( aDC ); // Display cursor shape
|
||||
|
|
|
@ -40,8 +40,6 @@ BRIGHT_BOX::BRIGHT_BOX () :
|
|||
|
||||
void BRIGHT_BOX::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const
|
||||
{
|
||||
printf("DrawBB item %p\n", m_item);
|
||||
|
||||
if( !m_item )
|
||||
return;
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
class BRIGHT_BOX : public EDA_ITEM
|
||||
{
|
||||
public:
|
||||
BRIGHT_BOX( BOARD_ITEM* aItem );
|
||||
BRIGHT_BOX();
|
||||
~BRIGHT_BOX() {};
|
||||
|
||||
virtual const BOX2I ViewBBox() const override
|
||||
|
|
|
@ -743,7 +743,6 @@ int SELECTION_TOOL::findMove( const TOOL_EVENT& aEvent )
|
|||
|
||||
void SELECTION_TOOL::clearSelection()
|
||||
{
|
||||
printf("ClearSelection\n");
|
||||
if( m_selection.Empty() )
|
||||
return;
|
||||
|
||||
|
@ -821,7 +820,7 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector )
|
|||
getView()->SetVisible( &brightBox, true );
|
||||
// getView()->Hide( &brightBox, false );
|
||||
getView()->Update( &brightBox, KIGFX::GEOMETRY );
|
||||
// getView()->MarkTargetDirty( KIGFX::TARGET_OVERLAY );
|
||||
getView()->MarkTargetDirty( KIGFX::TARGET_OVERLAY );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1033,17 +1032,11 @@ void SELECTION_TOOL::selectVisually( BOARD_ITEM* aItem ) const
|
|||
|
||||
void SELECTION_TOOL::unselectVisually( BOARD_ITEM* aItem ) const
|
||||
{
|
||||
printf("UnselectVisually %p\n", aItem);
|
||||
// Restore original item visibility
|
||||
aItem->ClearSelected();
|
||||
view()->Hide( aItem, false );
|
||||
view()->Update( aItem, KIGFX::ALL );
|
||||
|
||||
printf("%d %d %d\n",
|
||||
!!aItem->IsSelected(),
|
||||
!!aItem->IsHighlighted(),
|
||||
!!aItem->IsBrightened() );
|
||||
|
||||
// Modules are treated in a special way - when they are selected, we have to
|
||||
// unselect all the parts that make the module, not the module itself
|
||||
|
||||
|
|
Loading…
Reference in New Issue