Don't push commit in DIALOG_TABLE_PROPERTIES if table is new.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17688
This commit is contained in:
Jeff Young 2024-04-29 16:55:31 +01:00
parent 15e5eabb91
commit 85a9d9e9ec
2 changed files with 2 additions and 2 deletions

View File

@ -367,7 +367,7 @@ bool DIALOG_TABLE_PROPERTIES::TransferDataFromWindow()
m_table->SetSeparatorsStroke( stroke );
}
if( !commit.Empty() )
if( pushCommit )
commit.Push( _( "Edit Table" ), SKIP_CONNECTIVITY );
return true;

View File

@ -1141,6 +1141,7 @@ int DRAWING_TOOL::DrawTable( const TOOL_EVENT& aEvent )
PCB_LAYER_ID layer = m_frame->GetActiveLayer();
table = new PCB_TABLE( m_frame->GetModel(), bds.GetLineThickness( layer ) );
table->SetFlags( IS_NEW );
table->SetLayer( layer );
table->SetColCount( 1 );
table->AddCell( new PCB_TABLECELL( table ) );
@ -1164,7 +1165,6 @@ int DRAWING_TOOL::DrawTable( const TOOL_EVENT& aEvent )
{
m_toolMgr->RunAction( PCB_ACTIONS::selectionClear );
table->ClearFlags();
table->Normalize();
DIALOG_TABLE_PROPERTIES dlg( m_frame, table );