From 5c93d0d6db923632df75c9bdf5458f63ddaa15ac Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 1 Jan 2018 20:42:54 +0000 Subject: [PATCH 4/5] Set document dirty flag for various dialogs. MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2.14.3 (Apple Git-98)" This is a multi-part message in MIME format. --------------2.14.3 (Apple Git-98) Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit Fixes the callers of the Design Settings and Zone Settings dialogs. Fixes: lp:793420 * https://bugs.launchpad.net/kicad/+bug/793420 --- pcbnew/dialogs/dialog_graphic_item_properties.cpp | 1 + pcbnew/dialogs/dialog_graphic_item_properties_for_Modedit.cpp | 1 + pcbnew/dialogs/dialog_graphic_items_options.cpp | 1 + pcbnew/dialogs/dialog_modedit_options.cpp | 1 + pcbnew/zones_by_polygon.cpp | 3 +++ 5 files changed, 7 insertions(+) --------------2.14.3 (Apple Git-98) Content-Type: text/x-patch; name="0004-Set-document-dirty-flag-for-various-dialogs.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0004-Set-document-dirty-flag-for-various-dialogs.patch" diff --git a/pcbnew/dialogs/dialog_graphic_item_properties.cpp b/pcbnew/dialogs/dialog_graphic_item_properties.cpp index d05f23ff9..3de9cf956 100644 --- a/pcbnew/dialogs/dialog_graphic_item_properties.cpp +++ b/pcbnew/dialogs/dialog_graphic_item_properties.cpp @@ -283,6 +283,7 @@ bool DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow() m_parent->SetMsgPanel( m_item ); m_parent->SetDesignSettings( m_brdSettings ); + m_parent->OnModify(); return true; } diff --git a/pcbnew/dialogs/dialog_graphic_item_properties_for_Modedit.cpp b/pcbnew/dialogs/dialog_graphic_item_properties_for_Modedit.cpp index 43dcf0598..8080c88ae 100644 --- a/pcbnew/dialogs/dialog_graphic_item_properties_for_Modedit.cpp +++ b/pcbnew/dialogs/dialog_graphic_item_properties_for_Modedit.cpp @@ -266,6 +266,7 @@ bool DIALOG_MODEDIT_FP_BODY_ITEM_PROPERTIES::TransferDataFromWindow() int thickness = ValueFromString( g_UserUnit, msg ); m_brdSettings.m_ModuleSegmentWidth = thickness; m_parent->SetDesignSettings( m_brdSettings ); + m_parent->OnModify(); m_item->SetLayer( ToLAYER_ID( layer ) ); diff --git a/pcbnew/dialogs/dialog_graphic_items_options.cpp b/pcbnew/dialogs/dialog_graphic_items_options.cpp index 411e9abc1..28fbb3f95 100644 --- a/pcbnew/dialogs/dialog_graphic_items_options.cpp +++ b/pcbnew/dialogs/dialog_graphic_items_options.cpp @@ -134,6 +134,7 @@ void DIALOG_GRAPHIC_ITEMS_OPTIONS::OnOkClick( wxCommandEvent& event ) g_DrawDefaultLineThickness = 0; m_parent->SetDesignSettings( m_brdSettings ); + m_parent->OnModify(); EndModal( wxID_OK ); } diff --git a/pcbnew/dialogs/dialog_modedit_options.cpp b/pcbnew/dialogs/dialog_modedit_options.cpp index 1b21b0b30..f85f8532a 100644 --- a/pcbnew/dialogs/dialog_modedit_options.cpp +++ b/pcbnew/dialogs/dialog_modedit_options.cpp @@ -132,6 +132,7 @@ void DIALOG_MODEDIT_OPTIONS::OnOkClick( wxCommandEvent& event ) m_brdSettings.m_ValueDefaultVisibility = sel != 1; m_parent->SetDesignSettings( m_brdSettings ); + m_parent->OnModify(); EndModal( wxID_OK ); } diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 9afc8083a..fc4de8dbc 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -636,6 +636,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) // Switch active layer to the selected zone layer SetActiveLayer( zoneInfo.m_CurrentZone_Layer ); SetZoneSettings( zoneInfo ); + OnModify(); } else { @@ -648,6 +649,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) zoneInfo << *s_CurrentZone; SetZoneSettings( zoneInfo ); + OnModify(); } // Show the Net for zones on copper layers @@ -911,6 +913,7 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* aZone ) } SetZoneSettings( zoneInfo ); + OnModify(); if( edited == ZONE_EXPORT_VALUES ) { --------------2.14.3 (Apple Git-98)--