Add view refresh calls for edit operations.
Note that the bug referenced in the "fixes" section is only one of many addressed by this commit. Fixes: lp:1798449 * https://bugs.launchpad.net/kicad/+bug/1798449
This commit is contained in:
parent
38c5b025c8
commit
8a54b1b3b7
|
@ -72,6 +72,8 @@ void SCH_EDIT_FRAME::DeleteAnnotation( bool aCurrentSheetOnly )
|
||||||
|
|
||||||
// Update the references for the sheet that is currently being displayed.
|
// Update the references for the sheet that is currently being displayed.
|
||||||
m_CurrentSheet->UpdateAllScreenReferences();
|
m_CurrentSheet->UpdateAllScreenReferences();
|
||||||
|
|
||||||
|
SyncView();
|
||||||
GetCanvas()->Refresh();
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
|
@ -230,13 +232,13 @@ void SCH_EDIT_FRAME::AnnotateComponents( bool aAnnotateSchematic,
|
||||||
if( !CheckAnnotate( aReporter, !aAnnotateSchematic ) )
|
if( !CheckAnnotate( aReporter, !aAnnotateSchematic ) )
|
||||||
aReporter.ReportTail( _( "Annotation complete." ), REPORTER::RPT_ACTION );
|
aReporter.ReportTail( _( "Annotation complete." ), REPORTER::RPT_ACTION );
|
||||||
|
|
||||||
OnModify();
|
|
||||||
|
|
||||||
// Update on screen references, that can be modified by previous calculations:
|
// Update on screen references, that can be modified by previous calculations:
|
||||||
m_CurrentSheet->UpdateAllScreenReferences();
|
m_CurrentSheet->UpdateAllScreenReferences();
|
||||||
SetSheetNumberAndCount();
|
SetSheetNumberAndCount();
|
||||||
|
|
||||||
SyncView();
|
SyncView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -709,8 +709,7 @@ void SCH_EDIT_FRAME::OnAutoplaceFields( wxCommandEvent& aEvent )
|
||||||
|
|
||||||
component->AutoplaceFields( screen, /* aManual */ true );
|
component->AutoplaceFields( screen, /* aManual */ true );
|
||||||
|
|
||||||
SyncView();
|
RefreshItem( component );
|
||||||
GetCanvas()->Refresh();
|
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,11 @@ void SCH_EDIT_FRAME::backAnnotateFootprints( const std::string& aChangedSetOfRef
|
||||||
}
|
}
|
||||||
|
|
||||||
if( isChanged )
|
if( isChanged )
|
||||||
|
{
|
||||||
|
SyncView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -252,6 +256,8 @@ bool SCH_EDIT_FRAME::LoadCmpToFootprintLinkFile()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SyncView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,12 +176,6 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
|
||||||
GetScreen()->ClearBlockCommand();
|
GetScreen()->ClearBlockCommand();
|
||||||
GetScreen()->SetCurItem( NULL );
|
GetScreen()->SetCurItem( NULL );
|
||||||
|
|
||||||
if( block->GetCount() )
|
|
||||||
{
|
|
||||||
DisplayError( this, wxT( "HandleBlockPLace() error: some items left in buffer" ) );
|
|
||||||
block->ClearItemsList();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_canvas->EndMouseCapture( GetToolId(), GetGalCanvas()->GetCurrentCursor(), wxEmptyString, false );
|
m_canvas->EndMouseCapture( GetToolId(), GetGalCanvas()->GetCurrentCursor(), wxEmptyString, false );
|
||||||
|
|
||||||
GetCanvas()->GetView()->ClearPreview();
|
GetCanvas()->GetView()->ClearPreview();
|
||||||
|
|
|
@ -77,5 +77,6 @@ void SCH_EDIT_FRAME::SetBusEntryShape( wxDC* DC, SCH_BUS_ENTRY_BASE* BusEntry, c
|
||||||
BusEntry->SetBusEntryShape( s_LastShape );
|
BusEntry->SetBusEntryShape( s_LastShape );
|
||||||
TestDanglingEnds();
|
TestDanglingEnds();
|
||||||
|
|
||||||
|
RefreshItem( BusEntry );
|
||||||
OnModify( );
|
OnModify( );
|
||||||
}
|
}
|
||||||
|
|
|
@ -336,6 +336,7 @@ bool DIALOG_EDIT_COMPONENT_IN_LIBRARY::TransferDataFromWindow()
|
||||||
m_libEntry->GetFootprints().Clear();
|
m_libEntry->GetFootprints().Clear();
|
||||||
m_libEntry->GetFootprints() = m_FootprintFilterListBox->GetStrings();
|
m_libEntry->GetFootprints() = m_FootprintFilterListBox->GetStrings();
|
||||||
|
|
||||||
|
m_Parent->RebuildView();
|
||||||
m_Parent->OnModify();
|
m_Parent->OnModify();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -533,8 +533,9 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::TransferDataFromWindow()
|
||||||
|
|
||||||
m_cmp->UpdatePinCache();
|
m_cmp->UpdatePinCache();
|
||||||
|
|
||||||
GetParent()->OnModify();
|
|
||||||
GetParent()->TestDanglingEnds();
|
GetParent()->TestDanglingEnds();
|
||||||
|
GetParent()->RefreshItem( m_cmp );
|
||||||
|
GetParent()->OnModify();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -334,13 +334,14 @@ bool DIALOG_LABEL_EDITOR::TransferDataFromWindow()
|
||||||
m_CurrentText->SetThickness( 0 );
|
m_CurrentText->SetThickness( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_Parent->RefreshItem( m_CurrentText );
|
||||||
|
m_Parent->GetCanvas()->Refresh();
|
||||||
m_Parent->OnModify();
|
m_Parent->OnModify();
|
||||||
|
|
||||||
// Make the text size the new default size ( if it is a new text ):
|
// Make the text size the new default size ( if it is a new text ):
|
||||||
if( m_CurrentText->IsNew() )
|
if( m_CurrentText->IsNew() )
|
||||||
SetDefaultTextSize( m_CurrentText->GetTextWidth() );
|
SetDefaultTextSize( m_CurrentText->GetTextWidth() );
|
||||||
|
|
||||||
m_Parent->GetCanvas()->RefreshDrawingRect( m_CurrentText->GetBoundingBox() );
|
|
||||||
m_Parent->GetCanvas()->MoveCursorToCrossHair();
|
m_Parent->GetCanvas()->MoveCursorToCrossHair();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -123,6 +123,8 @@ bool DIALOG_EDIT_LINE_STYLE::TransferDataFromWindow()
|
||||||
m_line->SetLineStyle( m_lineStyle->GetSelection() );
|
m_line->SetLineStyle( m_lineStyle->GetSelection() );
|
||||||
m_line->SetLineColor( m_selectedColor );
|
m_line->SetLineColor( m_selectedColor );
|
||||||
|
|
||||||
|
m_frame->RefreshItem( m_line );
|
||||||
|
m_frame->GetCanvas()->Refresh();
|
||||||
m_frame->OnModify();
|
m_frame->OnModify();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -784,6 +784,7 @@ bool DIALOG_FIELDS_EDITOR_GLOBAL::TransferDataFromWindow()
|
||||||
SCH_SHEET_PATH currentSheet = m_parent->GetCurrentSheet();
|
SCH_SHEET_PATH currentSheet = m_parent->GetCurrentSheet();
|
||||||
|
|
||||||
m_dataModel->ApplyData();
|
m_dataModel->ApplyData();
|
||||||
|
m_parent->SyncView();
|
||||||
m_parent->OnModify();
|
m_parent->OnModify();
|
||||||
|
|
||||||
// Reset the view to where we left the user
|
// Reset the view to where we left the user
|
||||||
|
|
|
@ -98,6 +98,8 @@ bool DIALOG_SCH_EDIT_SHEET_PIN::TransferDataFromWindow()
|
||||||
auto shape = static_cast<PINSHEETLABEL_SHAPE>( m_choiceConnectionType->GetCurrentSelection() );
|
auto shape = static_cast<PINSHEETLABEL_SHAPE>( m_choiceConnectionType->GetCurrentSelection() );
|
||||||
m_sheetPin->SetShape( shape );
|
m_sheetPin->SetShape( shape );
|
||||||
|
|
||||||
|
m_frame->RefreshItem( m_sheetPin );
|
||||||
|
m_frame->GetCanvas()->Refresh();
|
||||||
m_frame->OnModify();
|
m_frame->OnModify();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -82,6 +82,8 @@ bool DIALOG_UPDATE_FIELDS::TransferDataFromWindow()
|
||||||
for( auto component : m_components )
|
for( auto component : m_components )
|
||||||
updateFields( component );
|
updateFields( component );
|
||||||
|
|
||||||
|
m_frame->SyncView();
|
||||||
|
m_frame->GetCanvas()->Refresh();
|
||||||
m_frame->OnModify();
|
m_frame->OnModify();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -140,47 +140,15 @@ SCH_BITMAP* SCH_EDIT_FRAME::CreateNewImage( wxDC* aDC )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SCH_EDIT_FRAME::MoveImage( SCH_BITMAP* aImageItem, wxDC* aDC )
|
|
||||||
{
|
|
||||||
// 5.1 TODO: MoveImage(), moveBitmap() and abortMoveBitmap() are obsolete....
|
|
||||||
|
|
||||||
aImageItem->SetFlags( IS_MOVED );
|
|
||||||
|
|
||||||
m_canvas->SetMouseCapture( moveBitmap, abortMoveBitmap );
|
|
||||||
GetScreen()->SetCurItem( aImageItem );
|
|
||||||
SetRepeatItem( NULL );
|
|
||||||
|
|
||||||
SetUndoItem( aImageItem );
|
|
||||||
|
|
||||||
if( aImageItem->IsMovableFromAnchorPoint() )
|
|
||||||
{
|
|
||||||
SetCrossHairPosition( aImageItem->GetPosition() );
|
|
||||||
m_canvas->MoveCursorToCrossHair();
|
|
||||||
aImageItem->SetStoredPos( wxPoint( 0,0 ) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Round the point under the cursor to a multiple of the grid
|
|
||||||
wxPoint cursorpos = GetCrossHairPosition() - aImageItem->GetPosition();
|
|
||||||
wxPoint gridsize = GetScreen()->GetGridSize();
|
|
||||||
cursorpos.x = ( cursorpos.x / gridsize.x ) * gridsize.x;
|
|
||||||
cursorpos.y = ( cursorpos.y / gridsize.y ) * gridsize.y;
|
|
||||||
|
|
||||||
aImageItem->SetStoredPos( cursorpos );
|
|
||||||
}
|
|
||||||
|
|
||||||
OnModify();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void SCH_EDIT_FRAME::RotateImage( SCH_BITMAP* aItem )
|
void SCH_EDIT_FRAME::RotateImage( SCH_BITMAP* aItem )
|
||||||
{
|
{
|
||||||
if( aItem->GetFlags( ) == 0 )
|
if( aItem->GetFlags( ) == 0 )
|
||||||
SaveCopyInUndoList( aItem, UR_ROTATED, false, aItem->GetPosition() );
|
SaveCopyInUndoList( aItem, UR_ROTATED, false, aItem->GetPosition() );
|
||||||
|
|
||||||
aItem->Rotate( aItem->GetPosition() );
|
aItem->Rotate( aItem->GetPosition() );
|
||||||
|
|
||||||
|
RefreshItem( aItem );
|
||||||
OnModify();
|
OnModify();
|
||||||
m_canvas->Refresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,8 +162,8 @@ void SCH_EDIT_FRAME::MirrorImage( SCH_BITMAP* aItem, bool Is_X_axis )
|
||||||
else
|
else
|
||||||
aItem->MirrorY( aItem->GetPosition().x );
|
aItem->MirrorY( aItem->GetPosition().x );
|
||||||
|
|
||||||
|
RefreshItem( aItem );
|
||||||
OnModify();
|
OnModify();
|
||||||
m_canvas->Refresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -217,6 +185,7 @@ void SCH_EDIT_FRAME::EditImage( SCH_BITMAP* aItem )
|
||||||
}
|
}
|
||||||
|
|
||||||
dlg.TransfertToImage( aItem->GetImage() );
|
dlg.TransfertToImage( aItem->GetImage() );
|
||||||
|
|
||||||
|
RefreshItem( aItem );
|
||||||
OnModify();
|
OnModify();
|
||||||
m_canvas->Refresh();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,12 +79,12 @@ void SCH_EDIT_FRAME::EditComponentFieldText( SCH_FIELD* aField )
|
||||||
dlg.UpdateField( aField, m_CurrentSheet );
|
dlg.UpdateField( aField, m_CurrentSheet );
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
m_canvas->SetIgnoreMouseEvents( false );
|
m_canvas->SetIgnoreMouseEvents( false );
|
||||||
OnModify();
|
|
||||||
|
|
||||||
if( m_autoplaceFields )
|
if( m_autoplaceFields )
|
||||||
component->AutoAutoplaceFields( GetScreen() );
|
component->AutoAutoplaceFields( GetScreen() );
|
||||||
|
|
||||||
m_canvas->Refresh();
|
RefreshItem( aField );
|
||||||
|
OnModify();
|
||||||
|
|
||||||
MSG_PANEL_ITEMS items;
|
MSG_PANEL_ITEMS items;
|
||||||
component->SetCurrentSheetPath( &GetCurrentSheet() );
|
component->SetCurrentSheetPath( &GetCurrentSheet() );
|
||||||
|
@ -110,5 +110,6 @@ void SCH_EDIT_FRAME::RotateField( SCH_FIELD* aField )
|
||||||
else
|
else
|
||||||
aField->SetTextAngle( TEXT_ANGLE_HORIZ );
|
aField->SetTextAngle( TEXT_ANGLE_HORIZ );
|
||||||
|
|
||||||
|
RefreshItem( aField );
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,8 @@ void SCH_EDIT_FRAME::ChangeTextOrient( SCH_TEXT* aTextItem )
|
||||||
SaveCopyInUndoList( aTextItem, UR_CHANGED );
|
SaveCopyInUndoList( aTextItem, UR_CHANGED );
|
||||||
|
|
||||||
aTextItem->SetLabelSpinStyle( orient );
|
aTextItem->SetLabelSpinStyle( orient );
|
||||||
|
|
||||||
|
RefreshItem( aTextItem );
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -619,8 +619,6 @@ bool SCH_EDIT_FRAME::AppendSchematic()
|
||||||
SCH_SCREENS allScreens;
|
SCH_SCREENS allScreens;
|
||||||
allScreens.ReplaceDuplicateTimeStamps();
|
allScreens.ReplaceDuplicateTimeStamps();
|
||||||
|
|
||||||
OnModify();
|
|
||||||
|
|
||||||
SCH_SCREENS screens( GetCurrentSheet().Last() );
|
SCH_SCREENS screens( GetCurrentSheet().Last() );
|
||||||
screens.UpdateSymbolLinks( true );
|
screens.UpdateSymbolLinks( true );
|
||||||
|
|
||||||
|
@ -631,7 +629,10 @@ bool SCH_EDIT_FRAME::AppendSchematic()
|
||||||
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
|
GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId );
|
||||||
Zoom_Automatique( false );
|
Zoom_Automatique( false );
|
||||||
SetSheetNumberAndCount();
|
SetSheetNumberAndCount();
|
||||||
|
|
||||||
SyncView();
|
SyncView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
|
OnModify();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
#include <sch_edit_frame.h>
|
#include <sch_edit_frame.h>
|
||||||
#include <base_units.h>
|
#include <base_units.h>
|
||||||
#include <trace_helpers.h>
|
#include <trace_helpers.h>
|
||||||
|
#include <sch_view.h>
|
||||||
#include <general.h>
|
#include <general.h>
|
||||||
#include <class_library.h>
|
#include <class_library.h>
|
||||||
#include <lib_pin.h>
|
#include <lib_pin.h>
|
||||||
|
@ -333,6 +333,7 @@ void SCH_EDIT_FRAME::OnFindReplace( wxFindDialogEvent& aEvent )
|
||||||
|
|
||||||
if( m_foundItems.ReplaceItem( sheet ) )
|
if( m_foundItems.ReplaceItem( sheet ) )
|
||||||
{
|
{
|
||||||
|
GetCanvas()->GetView()->Update( undoItem, KIGFX::ALL );
|
||||||
OnModify();
|
OnModify();
|
||||||
SaveUndoItemInUndoList( undoItem );
|
SaveUndoItemInUndoList( undoItem );
|
||||||
updateFindReplaceView( aEvent );
|
updateFindReplaceView( aEvent );
|
||||||
|
@ -363,6 +364,7 @@ void SCH_EDIT_FRAME::OnFindReplace( wxFindDialogEvent& aEvent )
|
||||||
|
|
||||||
if( m_foundItems.ReplaceItem( sheet ) )
|
if( m_foundItems.ReplaceItem( sheet ) )
|
||||||
{
|
{
|
||||||
|
GetCanvas()->GetView()->Update( undoItem, KIGFX::ALL );
|
||||||
OnModify();
|
OnModify();
|
||||||
SaveUndoItemInUndoList( undoItem );
|
SaveUndoItemInUndoList( undoItem );
|
||||||
updateFindReplaceView( aEvent );
|
updateFindReplaceView( aEvent );
|
||||||
|
|
|
@ -346,6 +346,8 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockDeleteSelectedItems( GetCurPart(), block );
|
BlockDeleteSelectedItems( GetCurPart(), block );
|
||||||
|
RebuildView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -366,6 +368,8 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
|
||||||
if( GetCurPart() )
|
if( GetCurPart() )
|
||||||
{
|
{
|
||||||
BlockDeleteSelectedItems( GetCurPart(), block );
|
BlockDeleteSelectedItems( GetCurPart(), block );
|
||||||
|
RebuildView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -449,7 +453,6 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
|
||||||
BlockMoveSelectedItems( pt, GetCurPart(), block );
|
BlockMoveSelectedItems( pt, GetCurPart(), block );
|
||||||
|
|
||||||
block->ClearItemsList();
|
block->ClearItemsList();
|
||||||
m_canvas->Refresh( true );
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_PASTE: // Paste (recopy the last block saved)
|
case BLOCK_PASTE: // Paste (recopy the last block saved)
|
||||||
|
@ -461,7 +464,6 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
|
||||||
pasteClipboard( pt );
|
pasteClipboard( pt );
|
||||||
|
|
||||||
block->ClearItemsList();
|
block->ClearItemsList();
|
||||||
m_canvas->Refresh( true );
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLOCK_ZOOM: // Handled by HandleBlockEnd
|
case BLOCK_ZOOM: // Handled by HandleBlockEnd
|
||||||
|
@ -472,6 +474,8 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RebuildView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
|
|
||||||
block->SetState( STATE_NO_BLOCK );
|
block->SetState( STATE_NO_BLOCK );
|
||||||
|
@ -481,8 +485,6 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
|
||||||
|
|
||||||
GetCanvas()->GetView()->ClearPreview();
|
GetCanvas()->GetView()->ClearPreview();
|
||||||
GetCanvas()->GetView()->ClearHiddenFlags();
|
GetCanvas()->GetView()->ClearHiddenFlags();
|
||||||
|
|
||||||
m_canvas->Refresh( true );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -547,6 +549,8 @@ void LIB_EDIT_FRAME::pasteClipboard( const wxPoint& aOffset )
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockMoveSelectedItems( aOffset, GetCurPart(), &GetScreen()->m_BlockLocate );
|
BlockMoveSelectedItems( aOffset, GetCurPart(), &GetScreen()->m_BlockLocate );
|
||||||
|
RebuildView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1003,6 +1003,8 @@ void LIB_EDIT_FRAME::EditSymbolText( wxDC* DC, LIB_ITEM* DrawItem )
|
||||||
if( dlg.ShowModal() != wxID_OK )
|
if( dlg.ShowModal() != wxID_OK )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
GetCanvas()->GetView()->Update( DrawItem );
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
|
|
||||||
// Display new text
|
// Display new text
|
||||||
|
@ -1051,6 +1053,9 @@ void LIB_EDIT_FRAME::OnEditComponentProperties( wxCommandEvent& event )
|
||||||
UpdatePartSelectList();
|
UpdatePartSelectList();
|
||||||
updateTitle();
|
updateTitle();
|
||||||
DisplayCmpDoc();
|
DisplayCmpDoc();
|
||||||
|
|
||||||
|
RebuildView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1186,7 +1191,7 @@ void LIB_EDIT_FRAME::OnRotate( wxCommandEvent& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
GetCanvas()->CallMouseCapture( nullptr, wxDefaultPosition, false );
|
GetCanvas()->CallMouseCapture( nullptr, wxDefaultPosition, false );
|
||||||
GetGalCanvas()->Refresh();
|
GetCanvas()->Refresh();
|
||||||
}
|
}
|
||||||
else if( item )
|
else if( item )
|
||||||
{
|
{
|
||||||
|
@ -1196,6 +1201,12 @@ void LIB_EDIT_FRAME::OnRotate( wxCommandEvent& aEvent )
|
||||||
SaveCopyInUndoList( part, UR_LIBEDIT );
|
SaveCopyInUndoList( part, UR_LIBEDIT );
|
||||||
|
|
||||||
item->Rotate( rotationPoint );
|
item->Rotate( rotationPoint );
|
||||||
|
|
||||||
|
if( item->InEditMode() )
|
||||||
|
GetCanvas()->CallMouseCapture( nullptr, wxDefaultPosition, false );
|
||||||
|
else
|
||||||
|
GetCanvas()->GetView()->Update( item );
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
|
|
||||||
if( !item->InEditMode() )
|
if( !item->InEditMode() )
|
||||||
|
@ -1243,7 +1254,7 @@ void LIB_EDIT_FRAME::OnOrient( wxCommandEvent& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
m_canvas->CallMouseCapture( nullptr, wxDefaultPosition, false );
|
m_canvas->CallMouseCapture( nullptr, wxDefaultPosition, false );
|
||||||
GetGalCanvas()->Refresh();
|
GetCanvas()->Refresh();
|
||||||
}
|
}
|
||||||
else if( item )
|
else if( item )
|
||||||
{
|
{
|
||||||
|
@ -1258,6 +1269,11 @@ void LIB_EDIT_FRAME::OnOrient( wxCommandEvent& aEvent )
|
||||||
else
|
else
|
||||||
item->MirrorVertical( mirrorPoint );
|
item->MirrorVertical( mirrorPoint );
|
||||||
|
|
||||||
|
if( item->InEditMode() )
|
||||||
|
m_canvas->CallMouseCapture( nullptr, wxDefaultPosition, false );
|
||||||
|
else
|
||||||
|
GetCanvas()->GetView()->Update( item );
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
|
|
||||||
if( !item->InEditMode() )
|
if( !item->InEditMode() )
|
||||||
|
@ -1418,11 +1434,6 @@ 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1452,6 +1463,8 @@ void LIB_EDIT_FRAME::OnOpenPinTable( wxCommandEvent& aEvent )
|
||||||
if( dlg.ShowModal() == wxID_CANCEL )
|
if( dlg.ShowModal() == wxID_CANCEL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
RebuildView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,6 +94,9 @@ void LIB_EDIT_FRAME::GetComponentFromRedoList( wxCommandEvent& event )
|
||||||
SetShowDeMorgan( part->HasConversion() );
|
SetShowDeMorgan( part->HasConversion() );
|
||||||
updateTitle();
|
updateTitle();
|
||||||
DisplayCmpDoc();
|
DisplayCmpDoc();
|
||||||
|
|
||||||
|
RebuildView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,5 +143,8 @@ void LIB_EDIT_FRAME::GetComponentFromUndoList( wxCommandEvent& event )
|
||||||
SetShowDeMorgan( part->HasConversion() );
|
SetShowDeMorgan( part->HasConversion() );
|
||||||
updateTitle();
|
updateTitle();
|
||||||
DisplayCmpDoc();
|
DisplayCmpDoc();
|
||||||
|
|
||||||
|
RebuildView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,5 +98,7 @@ void LIB_EDIT_FRAME::EditField( LIB_FIELD* aField )
|
||||||
|
|
||||||
dlg.UpdateField( aField );
|
dlg.UpdateField( aField );
|
||||||
|
|
||||||
|
GetCanvas()->GetView()->Update( aField );
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,6 +115,8 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
|
||||||
|
|
||||||
if( pin->IsModified() || pin->IsNew() )
|
if( pin->IsModified() || pin->IsNew() )
|
||||||
{
|
{
|
||||||
|
GetCanvas()->GetView()->Update( pin );
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify( );
|
OnModify( );
|
||||||
|
|
||||||
MSG_PANEL_ITEMS items;
|
MSG_PANEL_ITEMS items;
|
||||||
|
@ -267,6 +269,8 @@ void LIB_EDIT_FRAME::PlacePin()
|
||||||
|
|
||||||
SetDrawItem( NULL );
|
SetDrawItem( NULL );
|
||||||
|
|
||||||
|
RebuildView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,7 +278,6 @@ void LIB_EDIT_FRAME::PlacePin()
|
||||||
void LIB_EDIT_FRAME::StartMovePin( LIB_ITEM* aItem )
|
void LIB_EDIT_FRAME::StartMovePin( LIB_ITEM* aItem )
|
||||||
{
|
{
|
||||||
LIB_PIN* cur_pin = (LIB_PIN*) aItem;
|
LIB_PIN* cur_pin = (LIB_PIN*) aItem;
|
||||||
wxPoint startPos;
|
|
||||||
|
|
||||||
TempCopyComponent();
|
TempCopyComponent();
|
||||||
|
|
||||||
|
@ -294,8 +297,7 @@ void LIB_EDIT_FRAME::StartMovePin( LIB_ITEM* aItem )
|
||||||
|
|
||||||
if( pin->GetPosition() == cur_pin->GetPosition() &&
|
if( pin->GetPosition() == cur_pin->GetPosition() &&
|
||||||
pin->GetOrientation() == cur_pin->GetOrientation() &&
|
pin->GetOrientation() == cur_pin->GetOrientation() &&
|
||||||
pin->GetConvert() == cur_pin->GetConvert()
|
pin->GetConvert() == cur_pin->GetConvert() )
|
||||||
)
|
|
||||||
{
|
{
|
||||||
pin->SetFlags( IS_LINKED | IS_MOVED );
|
pin->SetFlags( IS_LINKED | IS_MOVED );
|
||||||
}
|
}
|
||||||
|
@ -303,13 +305,11 @@ void LIB_EDIT_FRAME::StartMovePin( LIB_ITEM* aItem )
|
||||||
|
|
||||||
cur_pin->SetFlags( IS_LINKED | IS_MOVED );
|
cur_pin->SetFlags( IS_LINKED | IS_MOVED );
|
||||||
|
|
||||||
startPos.x = OldPos.x;
|
|
||||||
startPos.y = -OldPos.y;
|
|
||||||
|
|
||||||
MSG_PANEL_ITEMS items;
|
MSG_PANEL_ITEMS items;
|
||||||
|
|
||||||
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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,9 +329,6 @@ static void DrawMovePin( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosi
|
||||||
if( cur_pin == NULL || cur_pin->Type() != LIB_PIN_T )
|
if( cur_pin == NULL || cur_pin->Type() != LIB_PIN_T )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
DBG(printf("DrawMovePin\n");)
|
|
||||||
|
|
||||||
auto p = aPanel->GetParent()->GetCrossHairPosition( true );
|
auto p = aPanel->GetParent()->GetCrossHairPosition( true );
|
||||||
|
|
||||||
// Redraw pin in new position
|
// Redraw pin in new position
|
||||||
|
@ -339,11 +336,8 @@ static void DrawMovePin( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosi
|
||||||
|
|
||||||
auto view = parent->GetCanvas()->GetView();
|
auto view = parent->GetCanvas()->GetView();
|
||||||
|
|
||||||
auto copy_pin = static_cast<LIB_PIN*>( cur_pin->Clone() );
|
|
||||||
|
|
||||||
view->Hide( cur_pin );
|
|
||||||
view->ClearPreview();
|
view->ClearPreview();
|
||||||
view->AddToPreview( copy_pin );
|
view->AddToPreview( cur_pin, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -494,6 +488,8 @@ void LIB_EDIT_FRAME::GlobalSetPins( LIB_PIN* aMasterPin, int aId )
|
||||||
|
|
||||||
// Now changes are made, call OnModify() to validate thes changes and set
|
// Now changes are made, call OnModify() to validate thes changes and set
|
||||||
// the global change for UI
|
// the global change for UI
|
||||||
|
RebuildView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -564,7 +560,10 @@ void LIB_EDIT_FRAME::RepeatPinItem( wxDC* DC, LIB_PIN* SourcePin )
|
||||||
MSG_PANEL_ITEMS items;
|
MSG_PANEL_ITEMS items;
|
||||||
pin->GetMsgPanelInfo( m_UserUnits, items );
|
pin->GetMsgPanelInfo( m_UserUnits, items );
|
||||||
SetMsgPanel( items );
|
SetMsgPanel( items );
|
||||||
OnModify( );
|
|
||||||
|
RebuildView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -97,6 +97,8 @@ void LIB_EDIT_FRAME::EditGraphicSymbol( wxDC* DC, LIB_ITEM* DrawItem )
|
||||||
|
|
||||||
DrawItem->SetWidth( m_drawLineWidth );
|
DrawItem->SetWidth( m_drawLineWidth );
|
||||||
|
|
||||||
|
GetCanvas()->GetView()->Update( DrawItem );
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify( );
|
OnModify( );
|
||||||
|
|
||||||
MSG_PANEL_ITEMS items;
|
MSG_PANEL_ITEMS items;
|
||||||
|
@ -117,9 +119,7 @@ static void AbortSymbolTraceOn( EDA_DRAW_PANEL* aPanel, wxDC* DC )
|
||||||
item->EndEdit( parent->GetCrossHairPosition( true ), true );
|
item->EndEdit( parent->GetCrossHairPosition( true ), true );
|
||||||
|
|
||||||
if( newItem )
|
if( newItem )
|
||||||
{
|
|
||||||
delete item;
|
delete item;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
parent->RestoreComponent();
|
parent->RestoreComponent();
|
||||||
|
|
||||||
|
@ -129,7 +129,6 @@ static void AbortSymbolTraceOn( EDA_DRAW_PANEL* aPanel, wxDC* DC )
|
||||||
view->ClearPreview();
|
view->ClearPreview();
|
||||||
view->ShowPreview( false );
|
view->ShowPreview( false );
|
||||||
view->ClearHiddenFlags();
|
view->ClearHiddenFlags();
|
||||||
DBG(printf("abort\n");)
|
|
||||||
parent->RebuildView();
|
parent->RebuildView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,28 +252,18 @@ void LIB_EDIT_FRAME::GraphicItemBeginDraw( wxDC* DC )
|
||||||
static void RedrawWhileMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
|
static void RedrawWhileMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
|
||||||
bool aErase )
|
bool aErase )
|
||||||
{
|
{
|
||||||
LIB_ITEM* item;
|
LIB_ITEM* item = ( (LIB_EDIT_FRAME*) aPanel->GetParent() )->GetDrawItem();
|
||||||
|
|
||||||
item = ( (LIB_EDIT_FRAME*) aPanel->GetParent() )->GetDrawItem();
|
|
||||||
|
|
||||||
if( item == NULL )
|
if( item == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DBG(printf("CalcDraw!\n");)
|
|
||||||
|
|
||||||
auto view = static_cast<SCH_DRAW_PANEL*>(aPanel)->GetView();
|
auto view = static_cast<SCH_DRAW_PANEL*>(aPanel)->GetView();
|
||||||
|
|
||||||
auto p = aPanel->GetParent()->GetCrossHairPosition( true );
|
auto p = aPanel->GetParent()->GetCrossHairPosition( true );
|
||||||
|
|
||||||
item->CalcEdit( p );
|
item->CalcEdit( p );
|
||||||
|
|
||||||
DBG(printf("cp: %d %d %d %d\n", item->GetPosition().x, item->GetPosition().y, p.x, p.y );)
|
|
||||||
|
|
||||||
view->ClearPreview();
|
view->ClearPreview();
|
||||||
|
view->AddToPreview( item, false );
|
||||||
auto copy = static_cast<LIB_ITEM*>( item->Clone() );
|
|
||||||
DBG(printf("cp: %d %d\n", copy->GetPosition().x, copy->GetPosition().y );)
|
|
||||||
view->AddToPreview( copy );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -185,30 +185,26 @@ void LIB_EDIT_FRAME::SaveOneSymbol()
|
||||||
prj.SetRString( PROJECT::SCH_LIB_PATH, fn.GetPath() );
|
prj.SetRString( PROJECT::SCH_LIB_PATH, fn.GetPath() );
|
||||||
|
|
||||||
if( fn.FileExists() )
|
if( fn.FileExists() )
|
||||||
{
|
|
||||||
wxRemove( fn.GetFullPath() );
|
wxRemove( fn.GetFullPath() );
|
||||||
}
|
|
||||||
|
|
||||||
wxString msg;
|
SetStatusText( wxString::Format( _( "Saving symbol in \"%s\"" ), fn.GetPath() ) );
|
||||||
msg.Printf( _( "Saving symbol in \"%s\"" ), fn.GetPath() );
|
|
||||||
SetStatusText( msg );
|
|
||||||
|
|
||||||
SCH_PLUGIN::SCH_PLUGIN_RELEASER pi( SCH_IO_MGR::FindPlugin( SCH_IO_MGR::SCH_LEGACY ) );
|
SCH_PLUGIN::SCH_PLUGIN_RELEASER plugin( SCH_IO_MGR::FindPlugin( SCH_IO_MGR::SCH_LEGACY ) );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
PROPERTIES nodoc_props; // Doc file is useless for a .sym file
|
PROPERTIES nodoc_props; // Doc file is useless for a .sym file
|
||||||
nodoc_props[ SCH_LEGACY_PLUGIN::PropNoDocFile ] = "";
|
nodoc_props[ SCH_LEGACY_PLUGIN::PropNoDocFile ] = "";
|
||||||
pi->CreateSymbolLib( fn.GetFullPath(), &nodoc_props );
|
plugin->CreateSymbolLib( fn.GetFullPath(), &nodoc_props );
|
||||||
|
|
||||||
LIB_PART* saved_part = new LIB_PART( *part );
|
LIB_PART* saved_part = new LIB_PART( *part );
|
||||||
saved_part->RemoveAllAliases(); // useless in a .sym file
|
saved_part->RemoveAllAliases(); // useless in a .sym file
|
||||||
pi->SaveSymbol( fn.GetFullPath(), saved_part, &nodoc_props );
|
plugin->SaveSymbol( fn.GetFullPath(), saved_part, &nodoc_props );
|
||||||
}
|
}
|
||||||
catch( const IO_ERROR& ioe )
|
catch( const IO_ERROR& ioe )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "An error occurred attempting to save symbol file \"%s\"" ),
|
wxString msg = wxString::Format( _( "An error occurred saving symbol file \"%s\"" ),
|
||||||
fn.GetFullPath() );
|
fn.GetFullPath() );
|
||||||
DisplayErrorMessage( this, msg, ioe.What() );
|
DisplayErrorMessage( this, msg, ioe.What() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -574,7 +574,8 @@ bool SCH_EDIT_FRAME::rescueProject( RESCUER& aRescuer, bool aRunningOnDemand )
|
||||||
viewer->ReCreateListLib();
|
viewer->ReCreateListLib();
|
||||||
|
|
||||||
GetScreen()->ClearUndoORRedoList( GetScreen()->m_UndoList, 1 );
|
GetScreen()->ClearUndoORRedoList( GetScreen()->m_UndoList, 1 );
|
||||||
m_canvas->Refresh( true );
|
SyncView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -1438,13 +1438,13 @@ void SCH_EDIT_FRAME::addCurrentItemToScreen()
|
||||||
|
|
||||||
item->ClearFlags();
|
item->ClearFlags();
|
||||||
|
|
||||||
GetCanvas()->GetView()->Update( item );
|
|
||||||
|
|
||||||
screen->SetModify();
|
screen->SetModify();
|
||||||
screen->SetCurItem( NULL );
|
screen->SetCurItem( NULL );
|
||||||
m_canvas->SetMouseCapture( NULL, NULL );
|
m_canvas->SetMouseCapture( NULL, NULL );
|
||||||
m_canvas->EndMouseCapture();
|
m_canvas->EndMouseCapture();
|
||||||
|
|
||||||
|
RefreshItem( item );
|
||||||
|
|
||||||
if( item->IsConnectable() )
|
if( item->IsConnectable() )
|
||||||
{
|
{
|
||||||
std::vector< wxPoint > pts;
|
std::vector< wxPoint > pts;
|
||||||
|
|
|
@ -1000,7 +1000,6 @@ private:
|
||||||
|
|
||||||
// Images:
|
// Images:
|
||||||
SCH_BITMAP* CreateNewImage( wxDC* aDC );
|
SCH_BITMAP* CreateNewImage( wxDC* aDC );
|
||||||
void MoveImage( SCH_BITMAP* aItem, wxDC* aDC );
|
|
||||||
void RotateImage( SCH_BITMAP* aItem );
|
void RotateImage( SCH_BITMAP* aItem );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -131,20 +131,21 @@ void SCH_VIEW::ClearPreview()
|
||||||
{
|
{
|
||||||
m_preview->Clear();
|
m_preview->Clear();
|
||||||
|
|
||||||
for( auto item : m_previewItems )
|
for( auto item : m_ownedItems )
|
||||||
delete item;
|
delete item;
|
||||||
|
|
||||||
m_previewItems.clear();
|
m_ownedItems.clear();
|
||||||
Update(m_preview.get());
|
Update( m_preview.get() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SCH_VIEW::AddToPreview( EDA_ITEM *aItem, bool owned )
|
void SCH_VIEW::AddToPreview( EDA_ITEM *aItem, bool takeOwnership )
|
||||||
{
|
{
|
||||||
|
Hide( aItem, false );
|
||||||
m_preview->Add( aItem );
|
m_preview->Add( aItem );
|
||||||
|
|
||||||
if( owned )
|
if( takeOwnership )
|
||||||
m_previewItems.push_back( aItem );
|
m_ownedItems.push_back( aItem );
|
||||||
|
|
||||||
SetVisible( m_preview.get(), true );
|
SetVisible( m_preview.get(), true );
|
||||||
Hide( m_preview.get(), false );
|
Hide( m_preview.get(), false );
|
||||||
|
|
|
@ -41,7 +41,7 @@ public:
|
||||||
KIGFX::VIEW_GROUP* GetPreview() const { return m_preview.get(); }
|
KIGFX::VIEW_GROUP* GetPreview() const { return m_preview.get(); }
|
||||||
|
|
||||||
void ClearPreview();
|
void ClearPreview();
|
||||||
void AddToPreview( EDA_ITEM *aItem, bool makeCopy = true );
|
void AddToPreview( EDA_ITEM *aItem, bool takeOwnership = true );
|
||||||
|
|
||||||
void ShowSelectionArea( bool aShow = true );
|
void ShowSelectionArea( bool aShow = true );
|
||||||
void ShowPreview( bool aShow = true );
|
void ShowPreview( bool aShow = true );
|
||||||
|
@ -55,7 +55,7 @@ private:
|
||||||
std::unique_ptr<WORKSHEET_VIEWITEM> m_worksheet;
|
std::unique_ptr<WORKSHEET_VIEWITEM> m_worksheet;
|
||||||
std::unique_ptr<KIGFX::PREVIEW::SELECTION_AREA> m_selectionArea;
|
std::unique_ptr<KIGFX::PREVIEW::SELECTION_AREA> m_selectionArea;
|
||||||
std::unique_ptr<KIGFX::VIEW_GROUP> m_preview;
|
std::unique_ptr<KIGFX::VIEW_GROUP> m_preview;
|
||||||
std::vector<EDA_ITEM *> m_previewItems;
|
std::vector<EDA_ITEM *> m_ownedItems;
|
||||||
std::unordered_map<VIEW_ITEM*, BOX2I> m_cachedBBoxes;
|
std::unordered_map<VIEW_ITEM*, BOX2I> m_cachedBBoxes;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -223,7 +223,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
SetRepeatItem( NULL );
|
SetRepeatItem( NULL );
|
||||||
TestDanglingEnds();
|
TestDanglingEnds();
|
||||||
SetSheetNumberAndCount();
|
SetSheetNumberAndCount();
|
||||||
m_canvas->Refresh();
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -262,8 +262,9 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
/* Save sheet in undo list before cleaning up unreferenced hierarchical labels. */
|
/* Save sheet in undo list before cleaning up unreferenced hierarchical labels. */
|
||||||
SaveCopyInUndoList( sheet, UR_CHANGED );
|
SaveCopyInUndoList( sheet, UR_CHANGED );
|
||||||
sheet->CleanupSheet();
|
sheet->CleanupSheet();
|
||||||
|
SyncView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
OnModify();
|
OnModify();
|
||||||
m_canvas->RefreshDrawingRect( sheet->GetBoundingBox() );
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -691,7 +692,6 @@ static void moveItemWithMouseCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
|
||||||
// Draw the item item at it's new position.
|
// Draw the item item at it's new position.
|
||||||
item->SetWireImage(); // While moving, the item may choose to render differently
|
item->SetWireImage(); // While moving, the item may choose to render differently
|
||||||
|
|
||||||
view->Hide( item );
|
|
||||||
view->ClearPreview();
|
view->ClearPreview();
|
||||||
view->AddToPreview( item, false );
|
view->AddToPreview( item, false );
|
||||||
}
|
}
|
||||||
|
|
|
@ -404,11 +404,13 @@ void SCH_EDIT_FRAME::GetSchematicFromUndoList( wxCommandEvent& event )
|
||||||
List->ReversePickersListOrder();
|
List->ReversePickersListOrder();
|
||||||
GetScreen()->PushCommandToRedoList( List );
|
GetScreen()->PushCommandToRedoList( List );
|
||||||
|
|
||||||
OnModify();
|
|
||||||
SetSheetNumberAndCount();
|
SetSheetNumberAndCount();
|
||||||
|
|
||||||
TestDanglingEnds();
|
TestDanglingEnds();
|
||||||
m_canvas->Refresh();
|
|
||||||
|
SyncView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -427,9 +429,11 @@ void SCH_EDIT_FRAME::GetSchematicFromRedoList( wxCommandEvent& event )
|
||||||
List->ReversePickersListOrder();
|
List->ReversePickersListOrder();
|
||||||
GetScreen()->PushCommandToUndoList( List );
|
GetScreen()->PushCommandToUndoList( List );
|
||||||
|
|
||||||
OnModify();
|
|
||||||
SetSheetNumberAndCount();
|
SetSheetNumberAndCount();
|
||||||
|
|
||||||
TestDanglingEnds();
|
TestDanglingEnds();
|
||||||
m_canvas->Refresh();
|
|
||||||
|
SyncView();
|
||||||
|
GetCanvas()->Refresh();
|
||||||
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue