Browse Source

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17688
fusion360
Jeff Young 2 years ago
parent
commit
85a9d9e9ec
  1. 2
      pcbnew/dialogs/dialog_table_properties.cpp
  2. 2
      pcbnew/tools/drawing_tool.cpp

2
pcbnew/dialogs/dialog_table_properties.cpp

@ -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;

2
pcbnew/tools/drawing_tool.cpp

@ -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 );

Loading…
Cancel
Save