From 27a55c5cd4e9e881cc75aa1c5705debac37c7618 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 12 Dec 2017 17:33:34 +0000 Subject: [PATCH] Commit in-place editing changes when dialog OK'ed. Grid control in-place editing changes are not automatically committed (at least on OSX). Fixes: lp:1736836 * https://bugs.launchpad.net/kicad/+bug/1736836 --- pcbnew/dialogs/dialog_design_rules.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pcbnew/dialogs/dialog_design_rules.cpp b/pcbnew/dialogs/dialog_design_rules.cpp index 64f5d8f8a9..691cba0eb0 100644 --- a/pcbnew/dialogs/dialog_design_rules.cpp +++ b/pcbnew/dialogs/dialog_design_rules.cpp @@ -614,6 +614,10 @@ void DIALOG_DESIGN_RULES::CopyDimensionsListsToBoard() { wxString msg; + // Commit any pending in-place edits from grid controls + m_gridTrackWidthList->SaveEditControlValue(); + m_gridViaSizeList->SaveEditControlValue(); + // Reinitialize m_TrackWidthList m_TracksWidthList.clear(); @@ -631,7 +635,7 @@ void DIALOG_DESIGN_RULES::CopyDimensionsListsToBoard() // Sort new list by by increasing value sort( m_TracksWidthList.begin(), m_TracksWidthList.end() ); - // Reinitialize m_TrackWidthList + // Reinitialize m_ViasDimensionsList m_ViasDimensionsList.clear(); for( int row = 0; row < m_gridViaSizeList->GetNumberRows(); ++row )