From 0aa6e437834d376eacae6bdfd3a42fe0dfb44c56 Mon Sep 17 00:00:00 2001 From: Sylwester Kocjan Date: Fri, 14 Feb 2020 08:36:25 +0100 Subject: [PATCH] eeschema: dialog_edit_component: fixed removing negative number of rows from grid. --- eeschema/dialogs/dialog_edit_component_in_lib.cpp | 2 +- eeschema/dialogs/dialog_edit_component_in_schematic.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eeschema/dialogs/dialog_edit_component_in_lib.cpp b/eeschema/dialogs/dialog_edit_component_in_lib.cpp index 6dbf7b1eee..de4e9636b4 100644 --- a/eeschema/dialogs/dialog_edit_component_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_lib.cpp @@ -519,7 +519,7 @@ void DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnEditSpiceModel( wxCommandEvent& event ) } else if( diff < 0 ) { - wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_DELETED, 0, diff ); + wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_DELETED, 0, -diff ); m_grid->ProcessTableMessage( msg ); } diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index c2e4bf4964..03f4bdde84 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -293,7 +293,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnEditSpiceModel( wxCommandEvent& event } else if( diff < 0 ) { - wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_DELETED, 0, diff ); + wxGridTableMessage msg( m_fields, wxGRIDTABLE_NOTIFY_ROWS_DELETED, 0, -diff ); m_grid->ProcessTableMessage( msg ); }