Upgrade more dialogs to SCHEMATIC_COMMIT.
This commit is contained in:
parent
dcfd426333
commit
73b653c276
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2004-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 2004-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -32,7 +32,6 @@
|
||||||
#include <kiface_base.h>
|
#include <kiface_base.h>
|
||||||
#include <pin_numbers.h>
|
#include <pin_numbers.h>
|
||||||
#include <string_utils.h>
|
#include <string_utils.h>
|
||||||
#include <menus_helpers.h>
|
|
||||||
#include <kiplatform/ui.h>
|
#include <kiplatform/ui.h>
|
||||||
#include <widgets/grid_icon_text_helpers.h>
|
#include <widgets/grid_icon_text_helpers.h>
|
||||||
#include <widgets/grid_combobox.h>
|
#include <widgets/grid_combobox.h>
|
||||||
|
@ -44,9 +43,9 @@
|
||||||
#include <sch_edit_frame.h>
|
#include <sch_edit_frame.h>
|
||||||
#include <sch_reference_list.h>
|
#include <sch_reference_list.h>
|
||||||
#include <schematic.h>
|
#include <schematic.h>
|
||||||
|
#include <schematic_commit.h>
|
||||||
#include <tool/tool_manager.h>
|
#include <tool/tool_manager.h>
|
||||||
#include <tool/actions.h>
|
#include <tool/actions.h>
|
||||||
#include <math/vector2d.h>
|
|
||||||
|
|
||||||
#include <dialog_sim_model.h>
|
#include <dialog_sim_model.h>
|
||||||
|
|
||||||
|
@ -697,6 +696,7 @@ bool DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow()
|
||||||
if( !m_pinGrid->CommitPendingChanges() )
|
if( !m_pinGrid->CommitPendingChanges() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
SCHEMATIC_COMMIT commit( GetParent() );
|
||||||
SCH_SCREEN* currentScreen = GetParent()->GetScreen();
|
SCH_SCREEN* currentScreen = GetParent()->GetScreen();
|
||||||
wxCHECK( currentScreen, false );
|
wxCHECK( currentScreen, false );
|
||||||
|
|
||||||
|
@ -706,7 +706,7 @@ bool DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow()
|
||||||
|
|
||||||
// save old cmp in undo list if not already in edit, or moving ...
|
// save old cmp in undo list if not already in edit, or moving ...
|
||||||
if( m_symbol->GetEditFlags() == 0 )
|
if( m_symbol->GetEditFlags() == 0 )
|
||||||
GetParent()->SaveCopyInUndoList( currentScreen, m_symbol, UNDO_REDO::CHANGED, false );
|
commit.Modify( m_symbol, currentScreen );
|
||||||
|
|
||||||
// Save current flags which could be modified by next change settings
|
// Save current flags which could be modified by next change settings
|
||||||
EDA_ITEM_FLAGS flags = m_symbol->GetFlags();
|
EDA_ITEM_FLAGS flags = m_symbol->GetFlags();
|
||||||
|
@ -870,7 +870,9 @@ bool DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow()
|
||||||
currentScreen->Append( m_symbol );
|
currentScreen->Append( m_symbol );
|
||||||
GetParent()->TestDanglingEnds();
|
GetParent()->TestDanglingEnds();
|
||||||
GetParent()->UpdateItem( m_symbol, false, true );
|
GetParent()->UpdateItem( m_symbol, false, true );
|
||||||
GetParent()->OnModify();
|
|
||||||
|
if( !commit.Empty() )
|
||||||
|
commit.Push( _( "Edit Symbol Properties" ) );
|
||||||
|
|
||||||
// This must go after OnModify() so that the connectivity graph will have been updated.
|
// This must go after OnModify() so that the connectivity graph will have been updated.
|
||||||
GetParent()->GetToolManager()->PostEvent( EVENTS::SelectedItemsModified );
|
GetParent()->GetToolManager()->PostEvent( EVENTS::SelectedItemsModified );
|
||||||
|
|
Loading…
Reference in New Issue