← Back to team overview

kicad-developers team mailing list archive

Component table improvements

 

After feedback on the original thread (
https://lists.launchpad.net/kicad-developers/msg29057.html)

I have made some further improvements to the component table:

a) Add values from template fields where no value exists
b) Allow users to specify which fields are used for sorting (default = all
fields)
c) Add an "Apply changes" button which updates components accordingly
d) UI improvements

Please find patches attached.
From a0c29c16fd6a19969872f2c0997c887ba6c9abc1 Mon Sep 17 00:00:00 2001
From: Oliver Walters <oliver.henry.walters@xxxxxxxxx>
Date: Sat, 6 May 2017 13:08:58 +1000
Subject: [PATCH 1/3] Added TemplateFields to component table viewer

---
 eeschema/bom_table_model.cpp           | 64 ++++++++++++++++++++++++++++++----
 eeschema/bom_table_model.h             | 13 +++++--
 eeschema/dialogs/dialog_bom_editor.cpp |  2 +-
 3 files changed, 69 insertions(+), 10 deletions(-)

diff --git a/eeschema/bom_table_model.cpp b/eeschema/bom_table_model.cpp
index f22022a..732cc1d 100644
--- a/eeschema/bom_table_model.cpp
+++ b/eeschema/bom_table_model.cpp
@@ -53,7 +53,9 @@ static BOM_TABLE_ROW const* ItemToRow( wxDataViewItem aItem )
     }
 }
 
-BOM_FIELD_VALUES::BOM_FIELD_VALUES( wxString aRefDes ) : m_refDes( aRefDes )
+BOM_FIELD_VALUES::BOM_FIELD_VALUES( wxString aRefDes, FIELD_VALUE_MAP* aTemplate ) :
+        m_refDes( aRefDes ),
+        m_templateValues( aTemplate )
 {
 }
 
@@ -88,6 +90,24 @@ bool BOM_FIELD_VALUES::GetBackupValue( unsigned int aFieldId, wxString& aValue )
 }
 
 /**
+ * Return the template value for a provided field ID (if it exists)
+ */
+bool BOM_FIELD_VALUES::GetTemplateValue( unsigned int aFieldId, wxString& aValue ) const
+{
+    if( !m_templateValues )
+        return false;
+
+    auto search = m_templateValues->find( aFieldId );
+
+    if( search == m_templateValues->end() )
+        return false;
+
+    aValue = search->second;
+
+    return true;
+}
+
+/**
  * Set the value for the provided field ID
  * Field value is set under any of the following conditions:
  * - param aOverwrite is true
@@ -563,6 +583,7 @@ bool BOM_TABLE_COMPONENT::AddUnit( SCH_REFERENCE aUnit )
     return false;
 }
 
+
 /**
  * Return the value associated with a particular field
  * If no field is found, return an empty string
@@ -582,8 +603,15 @@ wxString BOM_TABLE_COMPONENT::GetFieldValue( unsigned int aFieldId ) const
     }
 
     if( m_fieldValues )
+    {
         m_fieldValues->GetFieldValue( aFieldId, value );
 
+        if( value.IsEmpty() )
+        {
+            m_fieldValues->GetTemplateValue( aFieldId, value );
+        }
+    }
+
     return value;
 }
 
@@ -966,9 +994,9 @@ void BOM_TABLE_MODEL::AddComponentFields( SCH_COMPONENT* aCmp )
             continue;
 
         ColumnList.AddColumn( new BOM_COLUMN( ColumnList.NextFieldId(),
-                                         BOM_COL_TYPE_USER,
-                                         field->GetName(),
-                                         true, false ) );
+                                              BOM_COL_TYPE_USER,
+                                              field->GetName(),
+                                              true, false ) );
     }
 }
 
@@ -976,8 +1004,9 @@ void BOM_TABLE_MODEL::AddComponentFields( SCH_COMPONENT* aCmp )
  * Add a list of component items to the BOM manager
  * Creates consolidated groups of components as required
  */
-void BOM_TABLE_MODEL::SetComponents( SCH_REFERENCE_LIST aRefs )
+void BOM_TABLE_MODEL::SetComponents( SCH_REFERENCE_LIST aRefs, const TEMPLATE_FIELDNAMES& aTemplateFields )
 {
+
     // Add default columns
     AddDefaultColumns();
 
@@ -993,10 +1022,33 @@ void BOM_TABLE_MODEL::SetComponents( SCH_REFERENCE_LIST aRefs )
         }
     }
 
+    // Add template fields if they are not already added
+    for( auto field : aTemplateFields )
+    {
+        BOM_COLUMN* col;
+
+        col = ColumnList.GetColumnByTitle( field.m_Name );
+
+        if( !col )
+        {
+            col = new BOM_COLUMN( ColumnList.NextFieldId(),
+                                       BOM_COL_TYPE_USER,
+                                       field.m_Name,
+                                       true, false );
+
+            ColumnList.AddColumn( col );
+        }
+
+        // Add template value for that field
+        m_fieldTemplates[col->Id()] = field.m_Value;
+    }
+
     // Group multi-unit components together
     m_components.clear();
     m_fieldValues.clear();
 
+
+    // Iterate through each unique component
     for( unsigned int ii=0; ii<aRefs.GetCount(); ii++ )
     {
         auto ref = aRefs.GetItem( ii );
@@ -1033,7 +1085,7 @@ void BOM_TABLE_MODEL::SetComponents( SCH_REFERENCE_LIST aRefs )
 
             if( !dataFound )
             {
-                values = new BOM_FIELD_VALUES( refDes );
+                values = new BOM_FIELD_VALUES( refDes, &m_fieldTemplates );
                 m_fieldValues.push_back( std::unique_ptr<BOM_FIELD_VALUES>( values ) );
             }
 
diff --git a/eeschema/bom_table_model.h b/eeschema/bom_table_model.h
index 933db5c..6384dcb 100644
--- a/eeschema/bom_table_model.h
+++ b/eeschema/bom_table_model.h
@@ -58,10 +58,11 @@ typedef std::map<unsigned int, wxString> FIELD_VALUE_MAP;
 class BOM_FIELD_VALUES
 {
 public:
-    BOM_FIELD_VALUES(wxString aRefDes);
+    BOM_FIELD_VALUES( wxString aRefDes, FIELD_VALUE_MAP* aTemplate );
 
     bool GetFieldValue( unsigned int aFieldId, wxString& aValue ) const;
     bool GetBackupValue( unsigned int aFieldId, wxString& aValue ) const;
+    bool GetTemplateValue( unsigned int aFieldId, wxString& aValue ) const;
 
     void SetFieldValue( unsigned int aFieldId, wxString aValue, bool aOverwrite = false );
     void SetBackupValue( unsigned int aFieldId, wxString aValue );
@@ -81,6 +82,9 @@ protected:
 
     //! Backup values for each column
     FIELD_VALUE_MAP m_backupValues;
+
+    //! Template values for each column
+    FIELD_VALUE_MAP* m_templateValues;
 };
 
 /**
@@ -140,7 +144,7 @@ public:
     BOM_TABLE_GROUP( BOM_COLUMN_LIST* aColumnList );
     virtual ~BOM_TABLE_GROUP() {}
 
-    // Set display properties for
+    // Set display properties for a group row
     virtual bool GetAttr( unsigned int aFieldId, wxDataViewItemAttr& aAttr ) const override;
 
     // Get group row value
@@ -231,6 +235,9 @@ protected:
     // Vector of field values mapped to field IDs
     std::vector<std::unique_ptr<BOM_FIELD_VALUES>> m_fieldValues;
 
+    // Template field values
+    FIELD_VALUE_MAP m_fieldTemplates;
+
     // BOM Preferences
     //! Group components based on values
     bool m_groupColumns = true;
@@ -307,7 +314,7 @@ public:
 
     wxArrayString GetRowData( unsigned int aRow, std::vector<BOM_COLUMN*> aColumns ) const;
 
-    void SetComponents( SCH_REFERENCE_LIST aRefs );
+    void SetComponents( SCH_REFERENCE_LIST aRefs, const TEMPLATE_FIELDNAMES& aTemplateFields );
     void AddComponentFields( SCH_COMPONENT* aCmp );
 
     void RevertFieldChanges();
diff --git a/eeschema/dialogs/dialog_bom_editor.cpp b/eeschema/dialogs/dialog_bom_editor.cpp
index 1924cd2..5256b17 100644
--- a/eeschema/dialogs/dialog_bom_editor.cpp
+++ b/eeschema/dialogs/dialog_bom_editor.cpp
@@ -252,7 +252,7 @@ void DIALOG_BOM_EDITOR::LoadComponents()
     sheets.GetComponents( m_parent->Prj().SchLibs(), refs, false );
 
     // Pass the references through to the model
-    m_bom->SetComponents( refs );
+    m_bom->SetComponents( refs, m_parent->GetTemplateFieldNames() );
 }
 
 /**
-- 
2.7.4

From c1de3d28bd719a1e52a6a99bd1b890000995879e Mon Sep 17 00:00:00 2001
From: Oliver Walters <oliver.henry.walters@xxxxxxxxx>
Date: Sat, 6 May 2017 14:26:28 +1000
Subject: [PATCH 2/3] User has control over sorting

- All columns used for sorting by default
- Columns can be removed from sorting
---
 eeschema/bom_table_column.h            |  9 +++++++--
 eeschema/bom_table_model.cpp           |  4 ++++
 eeschema/dialogs/dialog_bom_editor.cpp | 16 ++++++++++++++++
 3 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/eeschema/bom_table_column.h b/eeschema/bom_table_column.h
index 3e29756..bf82927 100644
--- a/eeschema/bom_table_column.h
+++ b/eeschema/bom_table_column.h
@@ -88,13 +88,16 @@ protected:
     bool        m_Show;         ///< Is this column visible?
     bool        m_ReadOnly;     ///< Is this column read only?
 
+    bool        m_sort;         ///< Is this column used for sorting?
+
 public:
-    BOM_COLUMN( unsigned int aId, BOM_COLUMN_TYPE aType, const wxString aTitle, bool aShow, bool aReadOnly = false ) :
+    BOM_COLUMN( unsigned int aId, BOM_COLUMN_TYPE aType, const wxString aTitle, bool aShow, bool aReadOnly = false, bool aSort = true ) :
             m_id( aId ),
             m_Type( aType ),
             m_Title( aTitle.Strip( wxString::both ) ),
             m_Show( aShow ),
-            m_ReadOnly( aReadOnly )
+            m_ReadOnly( aReadOnly ),
+            m_sort( aSort )
     {
     }
 
@@ -103,11 +106,13 @@ public:
     wxString Title() const { return m_Title; }
     bool IsVisible() const { return m_Show; }
     bool IsReadOnly() const { return m_ReadOnly; }
+    bool IsUsedToSort() const { return m_sort; }
 
     //TODO - Should renaming of columns be allowed?
     //bool SetTitle( const wxString aTitle );
     void SetVisible( bool aShow = true ) { m_Show = aShow; }
     void SetReadOnly( bool aReadOnly = true ) { m_ReadOnly = aReadOnly; }
+    void SetUsedToSort( bool aSort = true ) { m_sort = aSort; }
 
 };
 
diff --git a/eeschema/bom_table_model.cpp b/eeschema/bom_table_model.cpp
index 732cc1d..1f29b69 100644
--- a/eeschema/bom_table_model.cpp
+++ b/eeschema/bom_table_model.cpp
@@ -337,6 +337,10 @@ bool BOM_TABLE_GROUP::AddComponent( BOM_TABLE_COMPONENT* aComponent )
 
     for( auto* column : m_columnList->Columns )
     {
+        // Ignore any columns marked as "not used for sorting"
+        if( !column->IsUsedToSort() )
+            continue;
+
         match = TestField( column, aComponent );
 
         // Escape on first mismatch
diff --git a/eeschema/dialogs/dialog_bom_editor.cpp b/eeschema/dialogs/dialog_bom_editor.cpp
index 5256b17..3ef0152 100644
--- a/eeschema/dialogs/dialog_bom_editor.cpp
+++ b/eeschema/dialogs/dialog_bom_editor.cpp
@@ -63,6 +63,12 @@ DIALOG_BOM_EDITOR::DIALOG_BOM_EDITOR( SCH_EDIT_FRAME* parent ) :
                                         wxDATAVIEW_CELL_ACTIVATABLE,
                                         100 );
 
+    auto sortColumn = m_columnListCtrl->AppendToggleColumn(
+                                        _( "Sort" ),
+                                        wxDATAVIEW_CELL_ACTIVATABLE,
+                                        100 );
+
+
     // Resize the columns appropriately
     m_columnListCtrl->Update();
 
@@ -75,6 +81,11 @@ DIALOG_BOM_EDITOR::DIALOG_BOM_EDITOR( SCH_EDIT_FRAME* parent ) :
     nameColumn->SetWidth( wxCOL_WIDTH_AUTOSIZE );
     nameColumn->SetResizeable( true );
 
+    sortColumn->SetWidth( wxCOL_WIDTH_AUTOSIZE );
+    sortColumn->SetResizeable( true );
+
+    m_columnListCtrl->Update();
+
     // Read all components
     LoadComponents();
 
@@ -273,6 +284,7 @@ void DIALOG_BOM_EDITOR::LoadColumnNames()
 
         data.push_back( wxVariant( col->Title() ) );        // Column title      (string)
         data.push_back( wxVariant( col->IsVisible() ) );    // Column visibility (bool)
+        data.push_back( wxVariant( col->IsUsedToSort() ) ); // Column is used to sort
 
         m_columnListCtrl->AppendItem( data );
     }
@@ -318,6 +330,10 @@ void DIALOG_BOM_EDITOR::OnColumnItemToggled( wxDataViewEvent& event )
             m_bom->RemoveColumn( bomColumn );
         }
         break;
+    case 2: // Column used to sort
+        bomColumn->SetUsedToSort( bValue );
+        m_bom->ReloadTable();
+        break;
     }
 }
 
-- 
2.7.4

From 9c1a6332f183057f7aba06d6ae6e04968e71c84c Mon Sep 17 00:00:00 2001
From: Oliver Walters <oliver.henry.walters@xxxxxxxxx>
Date: Sat, 6 May 2017 15:04:17 +1000
Subject: [PATCH 3/3] Added button to APPLY all changes

- Removed OK/CANCEL dialog
- Any unsaved changes will be alerted to the user on close
---
 eeschema/bom_table_model.cpp                |   32 +-
 eeschema/bom_table_model.h                  |    5 +-
 eeschema/dialogs/dialog_bom_editor.cpp      |  171 +--
 eeschema/dialogs/dialog_bom_editor.h        |   17 +-
 eeschema/dialogs/dialog_bom_editor_base.cpp |   54 +-
 eeschema/dialogs/dialog_bom_editor_base.fbp | 1501 +++++++++++++++------------
 eeschema/dialogs/dialog_bom_editor_base.h   |   25 +-
 7 files changed, 1022 insertions(+), 783 deletions(-)

diff --git a/eeschema/bom_table_model.cpp b/eeschema/bom_table_model.cpp
index 1f29b69..a9a247b 100644
--- a/eeschema/bom_table_model.cpp
+++ b/eeschema/bom_table_model.cpp
@@ -122,18 +122,6 @@ void BOM_FIELD_VALUES::SetFieldValue( unsigned int aFieldId, wxString aValue, bo
     }
 }
 
-/**
- * Set the backup value for the provided field ID
- * If the backup value is already set, new value is ignored
- */
-void BOM_FIELD_VALUES::SetBackupValue( unsigned int aFieldId, wxString aValue )
-{
-    if( m_backupValues.count( aFieldId ) == 0 || m_backupValues[aFieldId].IsEmpty() )
-    {
-        m_backupValues[aFieldId] = aValue;
-    }
-}
-
 bool BOM_FIELD_VALUES::HasValueChanged( unsigned int aFieldId) const
 {
     wxString currentValue, backupValue;
@@ -153,6 +141,14 @@ void BOM_FIELD_VALUES::RevertChanges( unsigned int aFieldId )
     SetFieldValue( aFieldId, backupValue, true );
 }
 
+void BOM_FIELD_VALUES::SetBackupPoint()
+{
+    for( auto it = m_currentValues.begin(); it != m_currentValues.end(); ++it )
+    {
+        m_backupValues[it->first] = it->second;
+    }
+}
+
 BOM_TABLE_ROW::BOM_TABLE_ROW() : m_columnList( nullptr )
 {
 }
@@ -578,7 +574,6 @@ bool BOM_TABLE_COMPONENT::AddUnit( SCH_REFERENCE aUnit )
             }
 
             m_fieldValues->SetFieldValue( column->Id(), value );
-            m_fieldValues->SetBackupValue( column->Id(), value );
         }
 
         return true;
@@ -1099,6 +1094,17 @@ void BOM_TABLE_MODEL::SetComponents( SCH_REFERENCE_LIST aRefs, const TEMPLATE_FI
             m_components.push_back( std::unique_ptr<BOM_TABLE_COMPONENT>( newComponent ) );
         }
     }
+
+    SetBackupPoint();
+}
+
+void BOM_TABLE_MODEL::SetBackupPoint()
+{
+    // Mark backup locations for all values
+    for( auto& vals : m_fieldValues )
+    {
+        vals->SetBackupPoint();
+    }
 }
 
 /**
diff --git a/eeschema/bom_table_model.h b/eeschema/bom_table_model.h
index 6384dcb..e011b1e 100644
--- a/eeschema/bom_table_model.h
+++ b/eeschema/bom_table_model.h
@@ -65,7 +65,6 @@ public:
     bool GetTemplateValue( unsigned int aFieldId, wxString& aValue ) const;
 
     void SetFieldValue( unsigned int aFieldId, wxString aValue, bool aOverwrite = false );
-    void SetBackupValue( unsigned int aFieldId, wxString aValue );
 
     wxString GetReference() const { return m_refDes; }
 
@@ -73,6 +72,8 @@ public:
 
     void RevertChanges( unsigned int aFieldId );
 
+    void SetBackupPoint();
+
 protected:
     //! The RefDes to which these values correspond
     wxString m_refDes;
@@ -322,6 +323,8 @@ public:
 
     bool HaveFieldsChanged() const;
 
+    void SetBackupPoint();
+
     std::vector<SCH_REFERENCE> GetChangedComponents();
     unsigned int CountChangedComponents();
 };
diff --git a/eeschema/dialogs/dialog_bom_editor.cpp b/eeschema/dialogs/dialog_bom_editor.cpp
index 3ef0152..e5114e5 100644
--- a/eeschema/dialogs/dialog_bom_editor.cpp
+++ b/eeschema/dialogs/dialog_bom_editor.cpp
@@ -120,6 +120,44 @@ DIALOG_BOM_EDITOR::~DIALOG_BOM_EDITOR()
     //TODO
 }
 
+void DIALOG_BOM_EDITOR::OnCloseButton( wxCommandEvent& event )
+{
+    CloseDialog();
+}
+
+bool DIALOG_BOM_EDITOR::CloseDialog()
+{
+    if( !m_bom->HaveFieldsChanged() )
+    {
+        Destroy();
+        return true;
+    }
+
+    int result = DisplayExitDialog( this, _( "Changes exist in component table" ) );
+
+    switch( result )
+    {
+    case wxID_CANCEL:
+       return false;
+    case wxID_NO:
+       break;
+    case wxID_YES:
+       ApplyAllChanges();
+       break;
+    }
+
+    Destroy();
+    return true;
+}
+
+void DIALOG_BOM_EDITOR::OnDialogClosed( wxCloseEvent& event )
+{
+    if( !CloseDialog() )
+    {
+        event.Veto();
+    }
+}
+
 /* Struct for keeping track of schematic sheet changes
  * Stores:
  * SHEET_PATH - Schematic to apply changes to
@@ -132,90 +170,85 @@ typedef struct
     PICKED_ITEMS_LIST items;
 } SheetUndoList;
 
-/**
- * When the component table dialog is closed,
- * work out if we need to save any changed.
- * If so, capture those changes and push them to the undo stack.
- */
-bool DIALOG_BOM_EDITOR::TransferDataFromWindow()
+void DIALOG_BOM_EDITOR::ApplyAllChanges()
 {
-    if( m_bom->HaveFieldsChanged() )
-    {
-         /**
-         * As we may be saving changes across multiple sheets,
-         * we need to first determine which changes need to be made to which sheet.
-         * To this end, we perform the following:
-         * 1. Save the "path" of the currently displayed sheet
-         * 2. Create a MAP of <SheetPath:ChangeList> changes that need to be made
-         * 3. Push UNDO actions to appropriate sheets
-         * 4. Perform all the update actions
-         * 5. Reset the view to the current sheet
-         */
-
-        auto currentSheet = m_parent->GetCurrentSheet();
-
-        //! Create a map of changes required for each sheet
-        std::map<wxString, SheetUndoList> undoSheetMap;
+    if( !m_bom->HaveFieldsChanged() )
+        return;
+
+     /**
+     * As we may be saving changes across multiple sheets,
+     * we need to first determine which changes need to be made to which sheet.
+     * To this end, we perform the following:
+     * 1. Save the "path" of the currently displayed sheet
+     * 2. Create a MAP of <SheetPath:ChangeList> changes that need to be made
+     * 3. Push UNDO actions to appropriate sheets
+     * 4. Perform all the update actions
+     * 5. Reset the view to the current sheet
+     */
 
-        // List of components that have changed
-        auto changed = m_bom->GetChangedComponents();
+    auto currentSheet = m_parent->GetCurrentSheet();
 
-        ITEM_PICKER picker;
+    //! Create a map of changes required for each sheet
+    std::map<wxString, SheetUndoList> undoSheetMap;
 
-        // Iterate through each of the components that were changed
-        for( auto ref : changed )
-        {
-            // Extract the SCH_COMPONENT* object
-            auto cmp = ref.GetComp();
+    // List of components that have changed
+    auto changed = m_bom->GetChangedComponents();
 
-            wxString path = ref.GetSheetPath().Path();
+    ITEM_PICKER picker;
 
-            // Push the component into the picker list
-            picker = ITEM_PICKER( cmp, UR_CHANGED );
-            picker.SetFlags( cmp->GetFlags() );
+    // Iterate through each of the components that were changed
+    for( auto ref : changed )
+    {
+        // Extract the SCH_COMPONENT* object
+        auto cmp = ref.GetComp();
 
-            /*
-             * If there is not currently an undo list for the given sheet,
-             * create an empty one
-             */
+        wxString path = ref.GetSheetPath().Path();
 
-            if( undoSheetMap.count( path ) == 0 )
-            {
-                SheetUndoList newList;
+        // Push the component into the picker list
+        picker = ITEM_PICKER( cmp, UR_CHANGED );
+        picker.SetFlags( cmp->GetFlags() );
 
-                newList.path = ref.GetSheetPath();
+        /*
+         * If there is not currently an undo list for the given sheet,
+         * create an empty one
+         */
 
-                undoSheetMap[path] = newList;
-            }
+        if( undoSheetMap.count( path ) == 0 )
+        {
+            SheetUndoList newList;
 
-            auto& pickerList = undoSheetMap[path];
+            newList.path = ref.GetSheetPath();
 
-            pickerList.items.PushItem( picker );
+            undoSheetMap[path] = newList;
         }
 
-        // Iterate through each sheet that needs updating
-        for( auto it = undoSheetMap.begin(); it != undoSheetMap.end(); ++it )
-        {
-            auto undo = it->second;
+        auto& pickerList = undoSheetMap[path];
 
-            m_parent->SetCurrentSheet( undo.path );
-            m_parent->SaveCopyInUndoList( undo.items, UR_CHANGED );
-            m_parent->OnModify();
-        }
+        pickerList.items.PushItem( picker );
+    }
 
-        // Make all component changes
-        m_bom->ApplyFieldChanges();
+    // Iterate through each sheet that needs updating
+    for( auto it = undoSheetMap.begin(); it != undoSheetMap.end(); ++it )
+    {
+        auto undo = it->second;
 
-        // Redraw the current sheet and mark as dirty
-        m_parent->Refresh();
+        m_parent->SetCurrentSheet( undo.path );
+        m_parent->SaveCopyInUndoList( undo.items, UR_CHANGED );
         m_parent->OnModify();
+    }
 
-        // Reset the view to where we left the user
-        m_parent->SetCurrentSheet(currentSheet);
+    // Make all component changes
+    m_bom->ApplyFieldChanges();
 
-    }
+    // Redraw the current sheet and mark as dirty
+    m_parent->Refresh();
+    m_parent->OnModify();
 
-    return true;
+    // Reset the view to where we left the user
+    m_parent->SetCurrentSheet(currentSheet);
+
+    // Instruct the table to set the current values as the new backup values
+    m_bom->SetBackupPoint();
 }
 
 /**
@@ -353,7 +386,11 @@ void DIALOG_BOM_EDITOR::OnGroupComponentsToggled( wxCommandEvent& event )
 void DIALOG_BOM_EDITOR::OnUpdateUI( wxUpdateUIEvent& event )
 {
     m_regroupComponentsButton->Enable( m_bom->GetColumnGrouping() );
-    m_reloadTableButton->Enable( m_bom->HaveFieldsChanged() );
+
+    bool changes = m_bom->HaveFieldsChanged();
+
+    m_applyChangesButton->Enable( changes );
+    m_revertChangesButton->Enable( changes );
 
     UpdateTitle();
 }
@@ -369,6 +406,12 @@ void DIALOG_BOM_EDITOR::OnRegroupComponents( wxCommandEvent& event )
     Update();
 }
 
+void DIALOG_BOM_EDITOR::OnApplyFieldChanges( wxCommandEvent& event )
+{
+    ApplyAllChanges();
+    Update();
+}
+
 void DIALOG_BOM_EDITOR::OnRevertFieldChanges( wxCommandEvent& event )
 {
     if( m_bom->HaveFieldsChanged() )
diff --git a/eeschema/dialogs/dialog_bom_editor.h b/eeschema/dialogs/dialog_bom_editor.h
index 90a18ff..c9d0896 100644
--- a/eeschema/dialogs/dialog_bom_editor.h
+++ b/eeschema/dialogs/dialog_bom_editor.h
@@ -57,13 +57,12 @@ private:
 
     BOM_TABLE_MODEL::MODEL_PTR m_bom;
 
-    void LoadComponents( void );
+    void LoadComponents();
 
-    void LoadColumnNames( void );
-    void ReloadColumns( void );
+    void LoadColumnNames();
+    void ReloadColumns();
 
-    // Called when the OK button is pressed
-    virtual bool TransferDataFromWindow() override;
+    void ApplyAllChanges();
 
     // Checkbox event callbacks
     virtual void OnColumnItemToggled( wxDataViewEvent& event ) override;
@@ -71,6 +70,8 @@ private:
 
     virtual void OnRevertFieldChanges( wxCommandEvent& event ) override;
 
+    virtual void OnApplyFieldChanges( wxCommandEvent& event ) override;
+
     virtual void OnRegroupComponents( wxCommandEvent& event ) override;
 
     // Called after a value in the table has changed
@@ -82,6 +83,12 @@ private:
     // Called when a cell is right-clicked
     virtual void OnTableItemContextMenu( wxDataViewEvent& event ) override;
 
+    // Called when the dialog is closed
+    virtual void OnDialogClosed( wxCloseEvent& event ) override;
+    virtual void OnCloseButton( wxCommandEvent& event ) override;
+
+    bool CloseDialog();
+
     void UpdateTitle( void );
 
     virtual void OnUpdateUI( wxUpdateUIEvent& event ) override;
diff --git a/eeschema/dialogs/dialog_bom_editor_base.cpp b/eeschema/dialogs/dialog_bom_editor_base.cpp
index 3eeecc5..c2c1643 100644
--- a/eeschema/dialogs/dialog_bom_editor_base.cpp
+++ b/eeschema/dialogs/dialog_bom_editor_base.cpp
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Feb 19 2017)
+// C++ code generated with wxFormBuilder (version Apr  1 2017)
 // http://www.wxformbuilder.org/
 //
 // PLEASE DO "NOT" EDIT THIS FILE!
@@ -10,10 +10,10 @@
 ///////////////////////////////////////////////////////////////////////////
 
 BEGIN_EVENT_TABLE( DIALOG_BOM_EDITOR_BASE, DIALOG_SHIM )
+	EVT_CLOSE( DIALOG_BOM_EDITOR_BASE::_wxFB_OnDialogClosed )
 	EVT_UPDATE_UI( wxID_ANY, DIALOG_BOM_EDITOR_BASE::_wxFB_OnUpdateUI )
 	EVT_CHECKBOX( OPT_GROUP_COMPONENTS, DIALOG_BOM_EDITOR_BASE::_wxFB_OnGroupComponentsToggled )
 	EVT_BUTTON( ID_BUTTON_REGROUP, DIALOG_BOM_EDITOR_BASE::_wxFB_OnRegroupComponents )
-	EVT_BUTTON( ID_BUTTON_REVERT_CHANGES, DIALOG_BOM_EDITOR_BASE::_wxFB_OnRevertFieldChanges )
 	EVT_DATAVIEW_ITEM_VALUE_CHANGED( wxID_ANY, DIALOG_BOM_EDITOR_BASE::_wxFB_OnColumnItemToggled )
 	EVT_DATAVIEW_COLUMN_REORDERED( wxID_ANY, DIALOG_BOM_EDITOR_BASE::_wxFB_OnBomColumReordered )
 	EVT_DATAVIEW_COLUMN_SORTED( wxID_ANY, DIALOG_BOM_EDITOR_BASE::_wxFB_OnBomColumnSorted )
@@ -21,6 +21,9 @@ BEGIN_EVENT_TABLE( DIALOG_BOM_EDITOR_BASE, DIALOG_SHIM )
 	EVT_DATAVIEW_ITEM_CONTEXT_MENU( wxID_ANY, DIALOG_BOM_EDITOR_BASE::_wxFB_OnTableItemContextMenu )
 	EVT_DATAVIEW_ITEM_EDITING_DONE( wxID_ANY, DIALOG_BOM_EDITOR_BASE::_wxFB_OnTableValueChanged )
 	EVT_DATAVIEW_SELECTION_CHANGED( wxID_ANY, DIALOG_BOM_EDITOR_BASE::_wxFB_OnSelectionChanged )
+	EVT_BUTTON( ID_BUTTON_APPLY, DIALOG_BOM_EDITOR_BASE::_wxFB_OnApplyFieldChanges )
+	EVT_BUTTON( ID_BUTTON_REVERT, DIALOG_BOM_EDITOR_BASE::_wxFB_OnRevertFieldChanges )
+	EVT_BUTTON( ID_BUTTON_CLOSE, DIALOG_BOM_EDITOR_BASE::_wxFB_OnCloseButton )
 END_EVENT_TABLE()
 
 DIALOG_BOM_EDITOR_BASE::DIALOG_BOM_EDITOR_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
@@ -30,6 +33,9 @@ DIALOG_BOM_EDITOR_BASE::DIALOG_BOM_EDITOR_BASE( wxWindow* parent, wxWindowID id,
 	wxBoxSizer* bHorizontalSizer;
 	bHorizontalSizer = new wxBoxSizer( wxVERTICAL );
 	
+	wxBoxSizer* bSizer61;
+	bSizer61 = new wxBoxSizer( wxVERTICAL );
+	
 	m_panel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
 	wxBoxSizer* bSizer7;
 	bSizer7 = new wxBoxSizer( wxVERTICAL );
@@ -54,12 +60,6 @@ DIALOG_BOM_EDITOR_BASE::DIALOG_BOM_EDITOR_BASE( wxWindow* parent, wxWindowID id,
 	m_regroupComponentsButton = new wxButton( sbSizer1->GetStaticBox(), ID_BUTTON_REGROUP, _("Regroup components"), wxDefaultPosition, wxDefaultSize, 0 );
 	sbSizer1->Add( m_regroupComponentsButton, 0, wxALL|wxEXPAND, 5 );
 	
-	m_reloadTableButton = new wxButton( sbSizer1->GetStaticBox(), ID_BUTTON_REVERT_CHANGES, _("Revert all changes"), wxDefaultPosition, wxDefaultSize, 0 );
-	m_reloadTableButton->Enable( false );
-	m_reloadTableButton->SetToolTip( _("Reload table (reverts component field changes)") );
-	
-	sbSizer1->Add( m_reloadTableButton, 0, wxALL|wxEXPAND, 5 );
-	
 	
 	bSizer6->Add( sbSizer1, 0, wxEXPAND, 5 );
 	
@@ -80,21 +80,6 @@ DIALOG_BOM_EDITOR_BASE::DIALOG_BOM_EDITOR_BASE( wxWindow* parent, wxWindowID id,
 	
 	bSizer6->Add( bSizer9, 5, wxEXPAND, 5 );
 	
-	wxStaticBoxSizer* sbSizer4;
-	sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( m_leftPanel, wxID_ANY, _("Apply changes") ), wxVERTICAL );
-	
-	m_sdbSizer1 = new wxStdDialogButtonSizer();
-	m_sdbSizer1OK = new wxButton( sbSizer4->GetStaticBox(), wxID_OK );
-	m_sdbSizer1->AddButton( m_sdbSizer1OK );
-	m_sdbSizer1Cancel = new wxButton( sbSizer4->GetStaticBox(), wxID_CANCEL );
-	m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
-	m_sdbSizer1->Realize();
-	
-	sbSizer4->Add( m_sdbSizer1, 1, wxEXPAND, 5 );
-	
-	
-	bSizer6->Add( sbSizer4, 0, wxEXPAND, 10 );
-	
 	
 	m_leftPanel->SetSizer( bSizer6 );
 	m_leftPanel->Layout();
@@ -119,7 +104,28 @@ DIALOG_BOM_EDITOR_BASE::DIALOG_BOM_EDITOR_BASE( wxWindow* parent, wxWindowID id,
 	m_panel->SetSizer( bSizer7 );
 	m_panel->Layout();
 	bSizer7->Fit( m_panel );
-	bHorizontalSizer->Add( m_panel, 1, wxEXPAND | wxALL, 5 );
+	bSizer61->Add( m_panel, 1, wxEXPAND | wxALL, 5 );
+	
+	wxBoxSizer* bSizer71;
+	bSizer71 = new wxBoxSizer( wxHORIZONTAL );
+	
+	m_applyChangesButton = new wxButton( this, ID_BUTTON_APPLY, _("Apply Changes"), wxDefaultPosition, wxDefaultSize, 0 );
+	bSizer71->Add( m_applyChangesButton, 0, wxALL, 5 );
+	
+	m_revertChangesButton = new wxButton( this, ID_BUTTON_REVERT, _("Revert Changes"), wxDefaultPosition, wxDefaultSize, 0 );
+	bSizer71->Add( m_revertChangesButton, 0, wxALL, 5 );
+	
+	
+	bSizer71->Add( 0, 0, 1, wxEXPAND, 5 );
+	
+	m_closeButton = new wxButton( this, ID_BUTTON_CLOSE, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+	bSizer71->Add( m_closeButton, 0, wxALL, 5 );
+	
+	
+	bSizer61->Add( bSizer71, 0, wxEXPAND, 5 );
+	
+	
+	bHorizontalSizer->Add( bSizer61, 1, wxEXPAND, 5 );
 	
 	
 	this->SetSizer( bHorizontalSizer );
diff --git a/eeschema/dialogs/dialog_bom_editor_base.fbp b/eeschema/dialogs/dialog_bom_editor_base.fbp
index 442b8d7..97630c8 100644
--- a/eeschema/dialogs/dialog_bom_editor_base.fbp
+++ b/eeschema/dialogs/dialog_bom_editor_base.fbp
@@ -44,7 +44,7 @@
             <property name="minimum_size"></property>
             <property name="name">DIALOG_BOM_EDITOR_BASE</property>
             <property name="pos"></property>
-            <property name="size">1047,471</property>
+            <property name="size">775,654</property>
             <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
             <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
             <property name="title">BOM editor</property>
@@ -61,7 +61,7 @@
             <event name="OnAuiPaneRestore"></event>
             <event name="OnAuiRender"></event>
             <event name="OnChar"></event>
-            <event name="OnClose"></event>
+            <event name="OnClose">OnDialogClosed</event>
             <event name="OnEnterWindow"></event>
             <event name="OnEraseBackground"></event>
             <event name="OnHibernate"></event>
@@ -95,177 +95,101 @@
                 <property name="permission">none</property>
                 <object class="sizeritem" expanded="1">
                     <property name="border">5</property>
-                    <property name="flag">wxEXPAND | wxALL</property>
+                    <property name="flag">wxEXPAND</property>
                     <property name="proportion">1</property>
-                    <object class="wxPanel" expanded="1">
-                        <property name="BottomDockable">1</property>
-                        <property name="LeftDockable">1</property>
-                        <property name="RightDockable">1</property>
-                        <property name="TopDockable">1</property>
-                        <property name="aui_layer"></property>
-                        <property name="aui_name"></property>
-                        <property name="aui_position"></property>
-                        <property name="aui_row"></property>
-                        <property name="best_size"></property>
-                        <property name="bg"></property>
-                        <property name="caption"></property>
-                        <property name="caption_visible">1</property>
-                        <property name="center_pane">0</property>
-                        <property name="close_button">1</property>
-                        <property name="context_help"></property>
-                        <property name="context_menu">1</property>
-                        <property name="default_pane">0</property>
-                        <property name="dock">Dock</property>
-                        <property name="dock_fixed">0</property>
-                        <property name="docking">Left</property>
-                        <property name="enabled">1</property>
-                        <property name="fg"></property>
-                        <property name="floatable">1</property>
-                        <property name="font"></property>
-                        <property name="gripper">0</property>
-                        <property name="hidden">0</property>
-                        <property name="id">wxID_ANY</property>
-                        <property name="max_size"></property>
-                        <property name="maximize_button">0</property>
-                        <property name="maximum_size"></property>
-                        <property name="min_size"></property>
-                        <property name="minimize_button">0</property>
+                    <object class="wxBoxSizer" expanded="1">
                         <property name="minimum_size"></property>
-                        <property name="moveable">1</property>
-                        <property name="name">m_panel</property>
-                        <property name="pane_border">1</property>
-                        <property name="pane_position"></property>
-                        <property name="pane_size"></property>
-                        <property name="permission">protected</property>
-                        <property name="pin_button">1</property>
-                        <property name="pos"></property>
-                        <property name="resize">Resizable</property>
-                        <property name="show">1</property>
-                        <property name="size"></property>
-                        <property name="subclass"></property>
-                        <property name="toolbar_pane">0</property>
-                        <property name="tooltip"></property>
-                        <property name="window_extra_style"></property>
-                        <property name="window_name"></property>
-                        <property name="window_style">wxTAB_TRAVERSAL</property>
-                        <event name="OnChar"></event>
-                        <event name="OnEnterWindow"></event>
-                        <event name="OnEraseBackground"></event>
-                        <event name="OnKeyDown"></event>
-                        <event name="OnKeyUp"></event>
-                        <event name="OnKillFocus"></event>
-                        <event name="OnLeaveWindow"></event>
-                        <event name="OnLeftDClick"></event>
-                        <event name="OnLeftDown"></event>
-                        <event name="OnLeftUp"></event>
-                        <event name="OnMiddleDClick"></event>
-                        <event name="OnMiddleDown"></event>
-                        <event name="OnMiddleUp"></event>
-                        <event name="OnMotion"></event>
-                        <event name="OnMouseEvents"></event>
-                        <event name="OnMouseWheel"></event>
-                        <event name="OnPaint"></event>
-                        <event name="OnRightDClick"></event>
-                        <event name="OnRightDown"></event>
-                        <event name="OnRightUp"></event>
-                        <event name="OnSetFocus"></event>
-                        <event name="OnSize"></event>
-                        <event name="OnUpdateUI"></event>
-                        <object class="wxBoxSizer" expanded="1">
-                            <property name="minimum_size"></property>
-                            <property name="name">bSizer7</property>
-                            <property name="orient">wxVERTICAL</property>
-                            <property name="permission">none</property>
-                            <object class="sizeritem" expanded="1">
-                                <property name="border">5</property>
-                                <property name="flag">wxEXPAND</property>
-                                <property name="proportion">1</property>
-                                <object class="wxSplitterWindow" expanded="1">
-                                    <property name="BottomDockable">1</property>
-                                    <property name="LeftDockable">1</property>
-                                    <property name="RightDockable">1</property>
-                                    <property name="TopDockable">1</property>
-                                    <property name="aui_layer"></property>
-                                    <property name="aui_name"></property>
-                                    <property name="aui_position"></property>
-                                    <property name="aui_row"></property>
-                                    <property name="best_size"></property>
-                                    <property name="bg"></property>
-                                    <property name="caption"></property>
-                                    <property name="caption_visible">1</property>
-                                    <property name="center_pane">0</property>
-                                    <property name="close_button">1</property>
-                                    <property name="context_help"></property>
-                                    <property name="context_menu">1</property>
-                                    <property name="default_pane">0</property>
-                                    <property name="dock">Dock</property>
-                                    <property name="dock_fixed">0</property>
-                                    <property name="docking">Left</property>
-                                    <property name="enabled">1</property>
-                                    <property name="fg"></property>
-                                    <property name="floatable">1</property>
-                                    <property name="font"></property>
-                                    <property name="gripper">0</property>
-                                    <property name="hidden">0</property>
-                                    <property name="id">wxID_ANY</property>
-                                    <property name="max_size"></property>
-                                    <property name="maximize_button">0</property>
-                                    <property name="maximum_size"></property>
-                                    <property name="min_pane_size">120</property>
-                                    <property name="min_size"></property>
-                                    <property name="minimize_button">0</property>
+                        <property name="name">bSizer61</property>
+                        <property name="orient">wxVERTICAL</property>
+                        <property name="permission">none</property>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND | wxALL</property>
+                            <property name="proportion">1</property>
+                            <object class="wxPanel" expanded="1">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_panel</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                                <object class="wxBoxSizer" expanded="1">
                                     <property name="minimum_size"></property>
-                                    <property name="moveable">1</property>
-                                    <property name="name">m_splitter1</property>
-                                    <property name="pane_border">1</property>
-                                    <property name="pane_position"></property>
-                                    <property name="pane_size"></property>
-                                    <property name="permission">protected</property>
-                                    <property name="pin_button">1</property>
-                                    <property name="pos"></property>
-                                    <property name="resize">Resizable</property>
-                                    <property name="sashgravity">0.0</property>
-                                    <property name="sashpos">231</property>
-                                    <property name="sashsize">-1</property>
-                                    <property name="show">1</property>
-                                    <property name="size"></property>
-                                    <property name="splitmode">wxSPLIT_VERTICAL</property>
-                                    <property name="style">wxSP_3D</property>
-                                    <property name="subclass"></property>
-                                    <property name="toolbar_pane">0</property>
-                                    <property name="tooltip"></property>
-                                    <property name="window_extra_style"></property>
-                                    <property name="window_name"></property>
-                                    <property name="window_style"></property>
-                                    <event name="OnChar"></event>
-                                    <event name="OnEnterWindow"></event>
-                                    <event name="OnEraseBackground"></event>
-                                    <event name="OnKeyDown"></event>
-                                    <event name="OnKeyUp"></event>
-                                    <event name="OnKillFocus"></event>
-                                    <event name="OnLeaveWindow"></event>
-                                    <event name="OnLeftDClick"></event>
-                                    <event name="OnLeftDown"></event>
-                                    <event name="OnLeftUp"></event>
-                                    <event name="OnMiddleDClick"></event>
-                                    <event name="OnMiddleDown"></event>
-                                    <event name="OnMiddleUp"></event>
-                                    <event name="OnMotion"></event>
-                                    <event name="OnMouseEvents"></event>
-                                    <event name="OnMouseWheel"></event>
-                                    <event name="OnPaint"></event>
-                                    <event name="OnRightDClick"></event>
-                                    <event name="OnRightDown"></event>
-                                    <event name="OnRightUp"></event>
-                                    <event name="OnSetFocus"></event>
-                                    <event name="OnSize"></event>
-                                    <event name="OnSplitterDClick"></event>
-                                    <event name="OnSplitterSashPosChanged"></event>
-                                    <event name="OnSplitterSashPosChanging"></event>
-                                    <event name="OnSplitterUnsplit"></event>
-                                    <event name="OnUpdateUI"></event>
-                                    <object class="splitteritem" expanded="1">
-                                        <object class="wxPanel" expanded="1">
+                                    <property name="name">bSizer7</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="1">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxSplitterWindow" expanded="1">
                                             <property name="BottomDockable">1</property>
                                             <property name="LeftDockable">1</property>
                                             <property name="RightDockable">1</property>
@@ -296,11 +220,12 @@
                                             <property name="max_size"></property>
                                             <property name="maximize_button">0</property>
                                             <property name="maximum_size"></property>
+                                            <property name="min_pane_size">120</property>
                                             <property name="min_size"></property>
                                             <property name="minimize_button">0</property>
                                             <property name="minimum_size"></property>
                                             <property name="moveable">1</property>
-                                            <property name="name">m_leftPanel</property>
+                                            <property name="name">m_splitter1</property>
                                             <property name="pane_border">1</property>
                                             <property name="pane_position"></property>
                                             <property name="pane_size"></property>
@@ -308,14 +233,19 @@
                                             <property name="pin_button">1</property>
                                             <property name="pos"></property>
                                             <property name="resize">Resizable</property>
+                                            <property name="sashgravity">0.0</property>
+                                            <property name="sashpos">231</property>
+                                            <property name="sashsize">-1</property>
                                             <property name="show">1</property>
                                             <property name="size"></property>
+                                            <property name="splitmode">wxSPLIT_VERTICAL</property>
+                                            <property name="style">wxSP_3D</property>
                                             <property name="subclass"></property>
                                             <property name="toolbar_pane">0</property>
                                             <property name="tooltip"></property>
                                             <property name="window_extra_style"></property>
                                             <property name="window_name"></property>
-                                            <property name="window_style">wxTAB_TRAVERSAL</property>
+                                            <property name="window_style"></property>
                                             <event name="OnChar"></event>
                                             <event name="OnEnterWindow"></event>
                                             <event name="OnEraseBackground"></event>
@@ -338,309 +268,100 @@
                                             <event name="OnRightUp"></event>
                                             <event name="OnSetFocus"></event>
                                             <event name="OnSize"></event>
+                                            <event name="OnSplitterDClick"></event>
+                                            <event name="OnSplitterSashPosChanged"></event>
+                                            <event name="OnSplitterSashPosChanging"></event>
+                                            <event name="OnSplitterUnsplit"></event>
                                             <event name="OnUpdateUI"></event>
-                                            <object class="wxBoxSizer" expanded="1">
-                                                <property name="minimum_size"></property>
-                                                <property name="name">bSizer6</property>
-                                                <property name="orient">wxVERTICAL</property>
-                                                <property name="permission">none</property>
-                                                <object class="sizeritem" expanded="0">
-                                                    <property name="border">5</property>
-                                                    <property name="flag">wxEXPAND</property>
-                                                    <property name="proportion">0</property>
-                                                    <object class="wxStaticBoxSizer" expanded="0">
-                                                        <property name="id">wxID_ANY</property>
-                                                        <property name="label">Options</property>
-                                                        <property name="minimum_size"></property>
-                                                        <property name="name">sbSizer1</property>
-                                                        <property name="orient">wxVERTICAL</property>
-                                                        <property name="parent">1</property>
-                                                        <property name="permission">none</property>
-                                                        <event name="OnUpdateUI"></event>
-                                                        <object class="sizeritem" expanded="0">
-                                                            <property name="border">5</property>
-                                                            <property name="flag">wxALL|wxEXPAND</property>
-                                                            <property name="proportion">0</property>
-                                                            <object class="wxCheckBox" expanded="0">
-                                                                <property name="BottomDockable">1</property>
-                                                                <property name="LeftDockable">1</property>
-                                                                <property name="RightDockable">1</property>
-                                                                <property name="TopDockable">1</property>
-                                                                <property name="aui_layer"></property>
-                                                                <property name="aui_name"></property>
-                                                                <property name="aui_position"></property>
-                                                                <property name="aui_row"></property>
-                                                                <property name="best_size"></property>
-                                                                <property name="bg"></property>
-                                                                <property name="caption"></property>
-                                                                <property name="caption_visible">1</property>
-                                                                <property name="center_pane">0</property>
-                                                                <property name="checked">1</property>
-                                                                <property name="close_button">1</property>
-                                                                <property name="context_help"></property>
-                                                                <property name="context_menu">1</property>
-                                                                <property name="default_pane">0</property>
-                                                                <property name="dock">Dock</property>
-                                                                <property name="dock_fixed">0</property>
-                                                                <property name="docking">Left</property>
-                                                                <property name="enabled">1</property>
-                                                                <property name="fg"></property>
-                                                                <property name="floatable">1</property>
-                                                                <property name="font"></property>
-                                                                <property name="gripper">0</property>
-                                                                <property name="hidden">0</property>
-                                                                <property name="id">OPT_GROUP_COMPONENTS</property>
-                                                                <property name="label">Group components</property>
-                                                                <property name="max_size"></property>
-                                                                <property name="maximize_button">0</property>
-                                                                <property name="maximum_size"></property>
-                                                                <property name="min_size"></property>
-                                                                <property name="minimize_button">0</property>
-                                                                <property name="minimum_size"></property>
-                                                                <property name="moveable">1</property>
-                                                                <property name="name">m_groupComponentsBox</property>
-                                                                <property name="pane_border">1</property>
-                                                                <property name="pane_position"></property>
-                                                                <property name="pane_size"></property>
-                                                                <property name="permission">protected</property>
-                                                                <property name="pin_button">1</property>
-                                                                <property name="pos"></property>
-                                                                <property name="resize">Resizable</property>
-                                                                <property name="show">1</property>
-                                                                <property name="size"></property>
-                                                                <property name="style"></property>
-                                                                <property name="subclass"></property>
-                                                                <property name="toolbar_pane">0</property>
-                                                                <property name="tooltip">Group components together based on common properties</property>
-                                                                <property name="validator_data_type"></property>
-                                                                <property name="validator_style">wxFILTER_NONE</property>
-                                                                <property name="validator_type">wxDefaultValidator</property>
-                                                                <property name="validator_variable"></property>
-                                                                <property name="window_extra_style"></property>
-                                                                <property name="window_name"></property>
-                                                                <property name="window_style"></property>
-                                                                <event name="OnChar"></event>
-                                                                <event name="OnCheckBox">OnGroupComponentsToggled</event>
-                                                                <event name="OnEnterWindow"></event>
-                                                                <event name="OnEraseBackground"></event>
-                                                                <event name="OnKeyDown"></event>
-                                                                <event name="OnKeyUp"></event>
-                                                                <event name="OnKillFocus"></event>
-                                                                <event name="OnLeaveWindow"></event>
-                                                                <event name="OnLeftDClick"></event>
-                                                                <event name="OnLeftDown"></event>
-                                                                <event name="OnLeftUp"></event>
-                                                                <event name="OnMiddleDClick"></event>
-                                                                <event name="OnMiddleDown"></event>
-                                                                <event name="OnMiddleUp"></event>
-                                                                <event name="OnMotion"></event>
-                                                                <event name="OnMouseEvents"></event>
-                                                                <event name="OnMouseWheel"></event>
-                                                                <event name="OnPaint"></event>
-                                                                <event name="OnRightDClick"></event>
-                                                                <event name="OnRightDown"></event>
-                                                                <event name="OnRightUp"></event>
-                                                                <event name="OnSetFocus"></event>
-                                                                <event name="OnSize"></event>
-                                                                <event name="OnUpdateUI"></event>
-                                                            </object>
-                                                        </object>
-                                                        <object class="sizeritem" expanded="0">
-                                                            <property name="border">5</property>
-                                                            <property name="flag">wxALL|wxEXPAND</property>
-                                                            <property name="proportion">0</property>
-                                                            <object class="wxButton" expanded="0">
-                                                                <property name="BottomDockable">1</property>
-                                                                <property name="LeftDockable">1</property>
-                                                                <property name="RightDockable">1</property>
-                                                                <property name="TopDockable">1</property>
-                                                                <property name="aui_layer"></property>
-                                                                <property name="aui_name"></property>
-                                                                <property name="aui_position"></property>
-                                                                <property name="aui_row"></property>
-                                                                <property name="best_size"></property>
-                                                                <property name="bg"></property>
-                                                                <property name="caption"></property>
-                                                                <property name="caption_visible">1</property>
-                                                                <property name="center_pane">0</property>
-                                                                <property name="close_button">1</property>
-                                                                <property name="context_help"></property>
-                                                                <property name="context_menu">1</property>
-                                                                <property name="default">0</property>
-                                                                <property name="default_pane">0</property>
-                                                                <property name="dock">Dock</property>
-                                                                <property name="dock_fixed">0</property>
-                                                                <property name="docking">Left</property>
-                                                                <property name="enabled">1</property>
-                                                                <property name="fg"></property>
-                                                                <property name="floatable">1</property>
-                                                                <property name="font"></property>
-                                                                <property name="gripper">0</property>
-                                                                <property name="hidden">0</property>
-                                                                <property name="id">ID_BUTTON_REGROUP</property>
-                                                                <property name="label">Regroup components</property>
-                                                                <property name="max_size"></property>
-                                                                <property name="maximize_button">0</property>
-                                                                <property name="maximum_size"></property>
-                                                                <property name="min_size"></property>
-                                                                <property name="minimize_button">0</property>
-                                                                <property name="minimum_size"></property>
-                                                                <property name="moveable">1</property>
-                                                                <property name="name">m_regroupComponentsButton</property>
-                                                                <property name="pane_border">1</property>
-                                                                <property name="pane_position"></property>
-                                                                <property name="pane_size"></property>
-                                                                <property name="permission">protected</property>
-                                                                <property name="pin_button">1</property>
-                                                                <property name="pos"></property>
-                                                                <property name="resize">Resizable</property>
-                                                                <property name="show">1</property>
-                                                                <property name="size"></property>
-                                                                <property name="style"></property>
-                                                                <property name="subclass"></property>
-                                                                <property name="toolbar_pane">0</property>
-                                                                <property name="tooltip"></property>
-                                                                <property name="validator_data_type"></property>
-                                                                <property name="validator_style">wxFILTER_NONE</property>
-                                                                <property name="validator_type">wxDefaultValidator</property>
-                                                                <property name="validator_variable"></property>
-                                                                <property name="window_extra_style"></property>
-                                                                <property name="window_name"></property>
-                                                                <property name="window_style"></property>
-                                                                <event name="OnButtonClick">OnRegroupComponents</event>
-                                                                <event name="OnChar"></event>
-                                                                <event name="OnEnterWindow"></event>
-                                                                <event name="OnEraseBackground"></event>
-                                                                <event name="OnKeyDown"></event>
-                                                                <event name="OnKeyUp"></event>
-                                                                <event name="OnKillFocus"></event>
-                                                                <event name="OnLeaveWindow"></event>
-                                                                <event name="OnLeftDClick"></event>
-                                                                <event name="OnLeftDown"></event>
-                                                                <event name="OnLeftUp"></event>
-                                                                <event name="OnMiddleDClick"></event>
-                                                                <event name="OnMiddleDown"></event>
-                                                                <event name="OnMiddleUp"></event>
-                                                                <event name="OnMotion"></event>
-                                                                <event name="OnMouseEvents"></event>
-                                                                <event name="OnMouseWheel"></event>
-                                                                <event name="OnPaint"></event>
-                                                                <event name="OnRightDClick"></event>
-                                                                <event name="OnRightDown"></event>
-                                                                <event name="OnRightUp"></event>
-                                                                <event name="OnSetFocus"></event>
-                                                                <event name="OnSize"></event>
-                                                                <event name="OnUpdateUI"></event>
-                                                            </object>
-                                                        </object>
-                                                        <object class="sizeritem" expanded="0">
-                                                            <property name="border">5</property>
-                                                            <property name="flag">wxALL|wxEXPAND</property>
-                                                            <property name="proportion">0</property>
-                                                            <object class="wxButton" expanded="0">
-                                                                <property name="BottomDockable">1</property>
-                                                                <property name="LeftDockable">1</property>
-                                                                <property name="RightDockable">1</property>
-                                                                <property name="TopDockable">1</property>
-                                                                <property name="aui_layer"></property>
-                                                                <property name="aui_name"></property>
-                                                                <property name="aui_position"></property>
-                                                                <property name="aui_row"></property>
-                                                                <property name="best_size"></property>
-                                                                <property name="bg"></property>
-                                                                <property name="caption"></property>
-                                                                <property name="caption_visible">1</property>
-                                                                <property name="center_pane">0</property>
-                                                                <property name="close_button">1</property>
-                                                                <property name="context_help"></property>
-                                                                <property name="context_menu">1</property>
-                                                                <property name="default">0</property>
-                                                                <property name="default_pane">0</property>
-                                                                <property name="dock">Dock</property>
-                                                                <property name="dock_fixed">0</property>
-                                                                <property name="docking">Left</property>
-                                                                <property name="enabled">0</property>
-                                                                <property name="fg"></property>
-                                                                <property name="floatable">1</property>
-                                                                <property name="font"></property>
-                                                                <property name="gripper">0</property>
-                                                                <property name="hidden">0</property>
-                                                                <property name="id">ID_BUTTON_REVERT_CHANGES</property>
-                                                                <property name="label">Revert all changes</property>
-                                                                <property name="max_size"></property>
-                                                                <property name="maximize_button">0</property>
-                                                                <property name="maximum_size"></property>
-                                                                <property name="min_size"></property>
-                                                                <property name="minimize_button">0</property>
-                                                                <property name="minimum_size"></property>
-                                                                <property name="moveable">1</property>
-                                                                <property name="name">m_reloadTableButton</property>
-                                                                <property name="pane_border">1</property>
-                                                                <property name="pane_position"></property>
-                                                                <property name="pane_size"></property>
-                                                                <property name="permission">protected</property>
-                                                                <property name="pin_button">1</property>
-                                                                <property name="pos"></property>
-                                                                <property name="resize">Resizable</property>
-                                                                <property name="show">1</property>
-                                                                <property name="size"></property>
-                                                                <property name="style"></property>
-                                                                <property name="subclass"></property>
-                                                                <property name="toolbar_pane">0</property>
-                                                                <property name="tooltip">Reload table (reverts component field changes)</property>
-                                                                <property name="validator_data_type"></property>
-                                                                <property name="validator_style">wxFILTER_NONE</property>
-                                                                <property name="validator_type">wxDefaultValidator</property>
-                                                                <property name="validator_variable"></property>
-                                                                <property name="window_extra_style"></property>
-                                                                <property name="window_name"></property>
-                                                                <property name="window_style"></property>
-                                                                <event name="OnButtonClick">OnRevertFieldChanges</event>
-                                                                <event name="OnChar"></event>
-                                                                <event name="OnEnterWindow"></event>
-                                                                <event name="OnEraseBackground"></event>
-                                                                <event name="OnKeyDown"></event>
-                                                                <event name="OnKeyUp"></event>
-                                                                <event name="OnKillFocus"></event>
-                                                                <event name="OnLeaveWindow"></event>
-                                                                <event name="OnLeftDClick"></event>
-                                                                <event name="OnLeftDown"></event>
-                                                                <event name="OnLeftUp"></event>
-                                                                <event name="OnMiddleDClick"></event>
-                                                                <event name="OnMiddleDown"></event>
-                                                                <event name="OnMiddleUp"></event>
-                                                                <event name="OnMotion"></event>
-                                                                <event name="OnMouseEvents"></event>
-                                                                <event name="OnMouseWheel"></event>
-                                                                <event name="OnPaint"></event>
-                                                                <event name="OnRightDClick"></event>
-                                                                <event name="OnRightDown"></event>
-                                                                <event name="OnRightUp"></event>
-                                                                <event name="OnSetFocus"></event>
-                                                                <event name="OnSize"></event>
-                                                                <event name="OnUpdateUI"></event>
-                                                            </object>
-                                                        </object>
-                                                    </object>
-                                                </object>
-                                                <object class="sizeritem" expanded="1">
-                                                    <property name="border">5</property>
-                                                    <property name="flag">wxEXPAND</property>
-                                                    <property name="proportion">5</property>
+                                            <object class="splitteritem" expanded="1">
+                                                <object class="wxPanel" expanded="1">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_leftPanel</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
                                                     <object class="wxBoxSizer" expanded="1">
                                                         <property name="minimum_size"></property>
-                                                        <property name="name">bSizer9</property>
+                                                        <property name="name">bSizer6</property>
                                                         <property name="orient">wxVERTICAL</property>
                                                         <property name="permission">none</property>
                                                         <object class="sizeritem" expanded="1">
                                                             <property name="border">5</property>
                                                             <property name="flag">wxEXPAND</property>
-                                                            <property name="proportion">1</property>
+                                                            <property name="proportion">0</property>
                                                             <object class="wxStaticBoxSizer" expanded="1">
                                                                 <property name="id">wxID_ANY</property>
-                                                                <property name="label">Fields</property>
+                                                                <property name="label">Options</property>
                                                                 <property name="minimum_size"></property>
-                                                                <property name="name">m_fieldListSizer</property>
+                                                                <property name="name">sbSizer1</property>
                                                                 <property name="orient">wxVERTICAL</property>
                                                                 <property name="parent">1</property>
                                                                 <property name="permission">none</property>
@@ -648,47 +369,155 @@
                                                                 <object class="sizeritem" expanded="0">
                                                                     <property name="border">5</property>
                                                                     <property name="flag">wxALL|wxEXPAND</property>
-                                                                    <property name="proportion">1</property>
-                                                                    <object class="wxDataViewListCtrl" expanded="0">
+                                                                    <property name="proportion">0</property>
+                                                                    <object class="wxCheckBox" expanded="0">
+                                                                        <property name="BottomDockable">1</property>
+                                                                        <property name="LeftDockable">1</property>
+                                                                        <property name="RightDockable">1</property>
+                                                                        <property name="TopDockable">1</property>
+                                                                        <property name="aui_layer"></property>
+                                                                        <property name="aui_name"></property>
+                                                                        <property name="aui_position"></property>
+                                                                        <property name="aui_row"></property>
+                                                                        <property name="best_size"></property>
                                                                         <property name="bg"></property>
+                                                                        <property name="caption"></property>
+                                                                        <property name="caption_visible">1</property>
+                                                                        <property name="center_pane">0</property>
+                                                                        <property name="checked">1</property>
+                                                                        <property name="close_button">1</property>
                                                                         <property name="context_help"></property>
                                                                         <property name="context_menu">1</property>
+                                                                        <property name="default_pane">0</property>
+                                                                        <property name="dock">Dock</property>
+                                                                        <property name="dock_fixed">0</property>
+                                                                        <property name="docking">Left</property>
                                                                         <property name="enabled">1</property>
                                                                         <property name="fg"></property>
+                                                                        <property name="floatable">1</property>
                                                                         <property name="font"></property>
+                                                                        <property name="gripper">0</property>
                                                                         <property name="hidden">0</property>
-                                                                        <property name="id">wxID_ANY</property>
+                                                                        <property name="id">OPT_GROUP_COMPONENTS</property>
+                                                                        <property name="label">Group components</property>
+                                                                        <property name="max_size"></property>
+                                                                        <property name="maximize_button">0</property>
+                                                                        <property name="maximum_size"></property>
+                                                                        <property name="min_size"></property>
+                                                                        <property name="minimize_button">0</property>
+                                                                        <property name="minimum_size"></property>
+                                                                        <property name="moveable">1</property>
+                                                                        <property name="name">m_groupComponentsBox</property>
+                                                                        <property name="pane_border">1</property>
+                                                                        <property name="pane_position"></property>
+                                                                        <property name="pane_size"></property>
+                                                                        <property name="permission">protected</property>
+                                                                        <property name="pin_button">1</property>
+                                                                        <property name="pos"></property>
+                                                                        <property name="resize">Resizable</property>
+                                                                        <property name="show">1</property>
+                                                                        <property name="size"></property>
+                                                                        <property name="style"></property>
+                                                                        <property name="subclass"></property>
+                                                                        <property name="toolbar_pane">0</property>
+                                                                        <property name="tooltip">Group components together based on common properties</property>
+                                                                        <property name="validator_data_type"></property>
+                                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                                        <property name="validator_variable"></property>
+                                                                        <property name="window_extra_style"></property>
+                                                                        <property name="window_name"></property>
+                                                                        <property name="window_style"></property>
+                                                                        <event name="OnChar"></event>
+                                                                        <event name="OnCheckBox">OnGroupComponentsToggled</event>
+                                                                        <event name="OnEnterWindow"></event>
+                                                                        <event name="OnEraseBackground"></event>
+                                                                        <event name="OnKeyDown"></event>
+                                                                        <event name="OnKeyUp"></event>
+                                                                        <event name="OnKillFocus"></event>
+                                                                        <event name="OnLeaveWindow"></event>
+                                                                        <event name="OnLeftDClick"></event>
+                                                                        <event name="OnLeftDown"></event>
+                                                                        <event name="OnLeftUp"></event>
+                                                                        <event name="OnMiddleDClick"></event>
+                                                                        <event name="OnMiddleDown"></event>
+                                                                        <event name="OnMiddleUp"></event>
+                                                                        <event name="OnMotion"></event>
+                                                                        <event name="OnMouseEvents"></event>
+                                                                        <event name="OnMouseWheel"></event>
+                                                                        <event name="OnPaint"></event>
+                                                                        <event name="OnRightDClick"></event>
+                                                                        <event name="OnRightDown"></event>
+                                                                        <event name="OnRightUp"></event>
+                                                                        <event name="OnSetFocus"></event>
+                                                                        <event name="OnSize"></event>
+                                                                        <event name="OnUpdateUI"></event>
+                                                                    </object>
+                                                                </object>
+                                                                <object class="sizeritem" expanded="0">
+                                                                    <property name="border">5</property>
+                                                                    <property name="flag">wxALL|wxEXPAND</property>
+                                                                    <property name="proportion">0</property>
+                                                                    <object class="wxButton" expanded="0">
+                                                                        <property name="BottomDockable">1</property>
+                                                                        <property name="LeftDockable">1</property>
+                                                                        <property name="RightDockable">1</property>
+                                                                        <property name="TopDockable">1</property>
+                                                                        <property name="aui_layer"></property>
+                                                                        <property name="aui_name"></property>
+                                                                        <property name="aui_position"></property>
+                                                                        <property name="aui_row"></property>
+                                                                        <property name="best_size"></property>
+                                                                        <property name="bg"></property>
+                                                                        <property name="caption"></property>
+                                                                        <property name="caption_visible">1</property>
+                                                                        <property name="center_pane">0</property>
+                                                                        <property name="close_button">1</property>
+                                                                        <property name="context_help"></property>
+                                                                        <property name="context_menu">1</property>
+                                                                        <property name="default">0</property>
+                                                                        <property name="default_pane">0</property>
+                                                                        <property name="dock">Dock</property>
+                                                                        <property name="dock_fixed">0</property>
+                                                                        <property name="docking">Left</property>
+                                                                        <property name="enabled">1</property>
+                                                                        <property name="fg"></property>
+                                                                        <property name="floatable">1</property>
+                                                                        <property name="font"></property>
+                                                                        <property name="gripper">0</property>
+                                                                        <property name="hidden">0</property>
+                                                                        <property name="id">ID_BUTTON_REGROUP</property>
+                                                                        <property name="label">Regroup components</property>
+                                                                        <property name="max_size"></property>
+                                                                        <property name="maximize_button">0</property>
                                                                         <property name="maximum_size"></property>
-                                                                        <property name="minimum_size">-1,250</property>
-                                                                        <property name="name">m_columnListCtrl</property>
+                                                                        <property name="min_size"></property>
+                                                                        <property name="minimize_button">0</property>
+                                                                        <property name="minimum_size"></property>
+                                                                        <property name="moveable">1</property>
+                                                                        <property name="name">m_regroupComponentsButton</property>
+                                                                        <property name="pane_border">1</property>
+                                                                        <property name="pane_position"></property>
+                                                                        <property name="pane_size"></property>
                                                                         <property name="permission">protected</property>
+                                                                        <property name="pin_button">1</property>
                                                                         <property name="pos"></property>
+                                                                        <property name="resize">Resizable</property>
+                                                                        <property name="show">1</property>
                                                                         <property name="size"></property>
                                                                         <property name="style"></property>
                                                                         <property name="subclass"></property>
+                                                                        <property name="toolbar_pane">0</property>
                                                                         <property name="tooltip"></property>
+                                                                        <property name="validator_data_type"></property>
+                                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                                        <property name="validator_variable"></property>
                                                                         <property name="window_extra_style"></property>
                                                                         <property name="window_name"></property>
                                                                         <property name="window_style"></property>
+                                                                        <event name="OnButtonClick">OnRegroupComponents</event>
                                                                         <event name="OnChar"></event>
-                                                                        <event name="OnDataViewListCtrlColumnHeaderClick"></event>
-                                                                        <event name="OnDataViewListCtrlColumnHeaderRightClick"></event>
-                                                                        <event name="OnDataViewListCtrlColumnReordered"></event>
-                                                                        <event name="OnDataViewListCtrlColumnSorted"></event>
-                                                                        <event name="OnDataViewListCtrlItemActivated"></event>
-                                                                        <event name="OnDataViewListCtrlItemBeginDrag"></event>
-                                                                        <event name="OnDataViewListCtrlItemCollapsed"></event>
-                                                                        <event name="OnDataViewListCtrlItemCollapsing"></event>
-                                                                        <event name="OnDataViewListCtrlItemContextMenu"></event>
-                                                                        <event name="OnDataViewListCtrlItemDrop"></event>
-                                                                        <event name="OnDataViewListCtrlItemDropPossible"></event>
-                                                                        <event name="OnDataViewListCtrlItemEditingDone"></event>
-                                                                        <event name="OnDataViewListCtrlItemEditingStarted"></event>
-                                                                        <event name="OnDataViewListCtrlItemExpanded"></event>
-                                                                        <event name="OnDataViewListCtrlItemExpanding"></event>
-                                                                        <event name="OnDataViewListCtrlItemStartEditing"></event>
-                                                                        <event name="OnDataViewListCtrlItemValueChanged">OnColumnItemToggled</event>
-                                                                        <event name="OnDataViewListCtrlSelectionChanged"></event>
                                                                         <event name="OnEnterWindow"></event>
                                                                         <event name="OnEraseBackground"></event>
                                                                         <event name="OnKeyDown"></event>
@@ -715,45 +544,249 @@
                                                                 </object>
                                                             </object>
                                                         </object>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxEXPAND</property>
+                                                            <property name="proportion">5</property>
+                                                            <object class="wxBoxSizer" expanded="0">
+                                                                <property name="minimum_size"></property>
+                                                                <property name="name">bSizer9</property>
+                                                                <property name="orient">wxVERTICAL</property>
+                                                                <property name="permission">none</property>
+                                                                <object class="sizeritem" expanded="0">
+                                                                    <property name="border">5</property>
+                                                                    <property name="flag">wxEXPAND</property>
+                                                                    <property name="proportion">1</property>
+                                                                    <object class="wxStaticBoxSizer" expanded="0">
+                                                                        <property name="id">wxID_ANY</property>
+                                                                        <property name="label">Fields</property>
+                                                                        <property name="minimum_size"></property>
+                                                                        <property name="name">m_fieldListSizer</property>
+                                                                        <property name="orient">wxVERTICAL</property>
+                                                                        <property name="parent">1</property>
+                                                                        <property name="permission">none</property>
+                                                                        <event name="OnUpdateUI"></event>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">5</property>
+                                                                            <property name="flag">wxALL|wxEXPAND</property>
+                                                                            <property name="proportion">1</property>
+                                                                            <object class="wxDataViewListCtrl" expanded="0">
+                                                                                <property name="bg"></property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="font"></property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="minimum_size">-1,250</property>
+                                                                                <property name="name">m_columnListCtrl</property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnDataViewListCtrlColumnHeaderClick"></event>
+                                                                                <event name="OnDataViewListCtrlColumnHeaderRightClick"></event>
+                                                                                <event name="OnDataViewListCtrlColumnReordered"></event>
+                                                                                <event name="OnDataViewListCtrlColumnSorted"></event>
+                                                                                <event name="OnDataViewListCtrlItemActivated"></event>
+                                                                                <event name="OnDataViewListCtrlItemBeginDrag"></event>
+                                                                                <event name="OnDataViewListCtrlItemCollapsed"></event>
+                                                                                <event name="OnDataViewListCtrlItemCollapsing"></event>
+                                                                                <event name="OnDataViewListCtrlItemContextMenu"></event>
+                                                                                <event name="OnDataViewListCtrlItemDrop"></event>
+                                                                                <event name="OnDataViewListCtrlItemDropPossible"></event>
+                                                                                <event name="OnDataViewListCtrlItemEditingDone"></event>
+                                                                                <event name="OnDataViewListCtrlItemEditingStarted"></event>
+                                                                                <event name="OnDataViewListCtrlItemExpanded"></event>
+                                                                                <event name="OnDataViewListCtrlItemExpanding"></event>
+                                                                                <event name="OnDataViewListCtrlItemStartEditing"></event>
+                                                                                <event name="OnDataViewListCtrlItemValueChanged">OnColumnItemToggled</event>
+                                                                                <event name="OnDataViewListCtrlSelectionChanged"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp"></event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                    </object>
+                                                                </object>
+                                                            </object>
+                                                        </object>
                                                     </object>
                                                 </object>
-                                                <object class="sizeritem" expanded="1">
-                                                    <property name="border">10</property>
-                                                    <property name="flag">wxEXPAND</property>
-                                                    <property name="proportion">0</property>
-                                                    <object class="wxStaticBoxSizer" expanded="1">
-                                                        <property name="id">wxID_ANY</property>
-                                                        <property name="label">Apply changes</property>
+                                            </object>
+                                            <object class="splitteritem" expanded="0">
+                                                <object class="wxPanel" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_panel4</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                    <object class="wxBoxSizer" expanded="0">
                                                         <property name="minimum_size"></property>
-                                                        <property name="name">sbSizer4</property>
+                                                        <property name="name">bSizer5</property>
                                                         <property name="orient">wxVERTICAL</property>
-                                                        <property name="parent">1</property>
                                                         <property name="permission">none</property>
-                                                        <event name="OnUpdateUI"></event>
                                                         <object class="sizeritem" expanded="0">
                                                             <property name="border">5</property>
-                                                            <property name="flag">wxEXPAND</property>
+                                                            <property name="flag">wxALL|wxEXPAND</property>
                                                             <property name="proportion">1</property>
-                                                            <object class="wxStdDialogButtonSizer" expanded="0">
-                                                                <property name="Apply">0</property>
-                                                                <property name="Cancel">1</property>
-                                                                <property name="ContextHelp">0</property>
-                                                                <property name="Help">0</property>
-                                                                <property name="No">0</property>
-                                                                <property name="OK">1</property>
-                                                                <property name="Save">0</property>
-                                                                <property name="Yes">0</property>
-                                                                <property name="minimum_size"></property>
-                                                                <property name="name">m_sdbSizer1</property>
+                                                            <object class="wxDataViewCtrl" expanded="0">
+                                                                <property name="bg"></property>
+                                                                <property name="context_help"></property>
+                                                                <property name="context_menu">1</property>
+                                                                <property name="enabled">1</property>
+                                                                <property name="fg"></property>
+                                                                <property name="font"></property>
+                                                                <property name="hidden">0</property>
+                                                                <property name="id">wxID_ANY</property>
+                                                                <property name="maximum_size"></property>
+                                                                <property name="minimum_size">450,250</property>
+                                                                <property name="name">m_bomView</property>
                                                                 <property name="permission">protected</property>
-                                                                <event name="OnApplyButtonClick"></event>
-                                                                <event name="OnCancelButtonClick"></event>
-                                                                <event name="OnContextHelpButtonClick"></event>
-                                                                <event name="OnHelpButtonClick"></event>
-                                                                <event name="OnNoButtonClick"></event>
-                                                                <event name="OnOKButtonClick"></event>
-                                                                <event name="OnSaveButtonClick"></event>
-                                                                <event name="OnYesButtonClick"></event>
+                                                                <property name="pos"></property>
+                                                                <property name="size"></property>
+                                                                <property name="style">wxDV_MULTIPLE|wxDV_ROW_LINES|wxDV_VERT_RULES</property>
+                                                                <property name="subclass"></property>
+                                                                <property name="tooltip"></property>
+                                                                <property name="window_extra_style"></property>
+                                                                <property name="window_name"></property>
+                                                                <property name="window_style"></property>
+                                                                <event name="OnChar"></event>
+                                                                <event name="OnDataViewCtrlColumnHeaderClick"></event>
+                                                                <event name="OnDataViewCtrlColumnHeaderRightClick"></event>
+                                                                <event name="OnDataViewCtrlColumnReordered">OnBomColumReordered</event>
+                                                                <event name="OnDataViewCtrlColumnSorted">OnBomColumnSorted</event>
+                                                                <event name="OnDataViewCtrlItemActivated">OnTableItemActivated</event>
+                                                                <event name="OnDataViewCtrlItemBeginDrag"></event>
+                                                                <event name="OnDataViewCtrlItemCollapsed"></event>
+                                                                <event name="OnDataViewCtrlItemCollapsing"></event>
+                                                                <event name="OnDataViewCtrlItemContextMenu">OnTableItemContextMenu</event>
+                                                                <event name="OnDataViewCtrlItemDrop"></event>
+                                                                <event name="OnDataViewCtrlItemDropPossible"></event>
+                                                                <event name="OnDataViewCtrlItemEditingDone">OnTableValueChanged</event>
+                                                                <event name="OnDataViewCtrlItemEditingStarted"></event>
+                                                                <event name="OnDataViewCtrlItemExpanded"></event>
+                                                                <event name="OnDataViewCtrlItemExpanding"></event>
+                                                                <event name="OnDataViewCtrlItemStartEditing"></event>
+                                                                <event name="OnDataViewCtrlItemValueChanged"></event>
+                                                                <event name="OnDataViewCtrlSelectionChanged">OnSelectionChanged</event>
+                                                                <event name="OnEnterWindow"></event>
+                                                                <event name="OnEraseBackground"></event>
+                                                                <event name="OnKeyDown"></event>
+                                                                <event name="OnKeyUp"></event>
+                                                                <event name="OnKillFocus"></event>
+                                                                <event name="OnLeaveWindow"></event>
+                                                                <event name="OnLeftDClick"></event>
+                                                                <event name="OnLeftDown"></event>
+                                                                <event name="OnLeftUp"></event>
+                                                                <event name="OnMiddleDClick"></event>
+                                                                <event name="OnMiddleDown"></event>
+                                                                <event name="OnMiddleUp"></event>
+                                                                <event name="OnMotion"></event>
+                                                                <event name="OnMouseEvents"></event>
+                                                                <event name="OnMouseWheel"></event>
+                                                                <event name="OnPaint"></event>
+                                                                <event name="OnRightDClick"></event>
+                                                                <event name="OnRightDown"></event>
+                                                                <event name="OnRightUp"></event>
+                                                                <event name="OnSetFocus"></event>
+                                                                <event name="OnSize"></event>
+                                                                <event name="OnUpdateUI"></event>
                                                             </object>
                                                         </object>
                                                     </object>
@@ -761,156 +794,290 @@
                                             </object>
                                         </object>
                                     </object>
-                                    <object class="splitteritem" expanded="1">
-                                        <object class="wxPanel" expanded="1">
-                                            <property name="BottomDockable">1</property>
-                                            <property name="LeftDockable">1</property>
-                                            <property name="RightDockable">1</property>
-                                            <property name="TopDockable">1</property>
-                                            <property name="aui_layer"></property>
-                                            <property name="aui_name"></property>
-                                            <property name="aui_position"></property>
-                                            <property name="aui_row"></property>
-                                            <property name="best_size"></property>
-                                            <property name="bg"></property>
-                                            <property name="caption"></property>
-                                            <property name="caption_visible">1</property>
-                                            <property name="center_pane">0</property>
-                                            <property name="close_button">1</property>
-                                            <property name="context_help"></property>
-                                            <property name="context_menu">1</property>
-                                            <property name="default_pane">0</property>
-                                            <property name="dock">Dock</property>
-                                            <property name="dock_fixed">0</property>
-                                            <property name="docking">Left</property>
-                                            <property name="enabled">1</property>
-                                            <property name="fg"></property>
-                                            <property name="floatable">1</property>
-                                            <property name="font"></property>
-                                            <property name="gripper">0</property>
-                                            <property name="hidden">0</property>
-                                            <property name="id">wxID_ANY</property>
-                                            <property name="max_size"></property>
-                                            <property name="maximize_button">0</property>
-                                            <property name="maximum_size"></property>
-                                            <property name="min_size"></property>
-                                            <property name="minimize_button">0</property>
-                                            <property name="minimum_size"></property>
-                                            <property name="moveable">1</property>
-                                            <property name="name">m_panel4</property>
-                                            <property name="pane_border">1</property>
-                                            <property name="pane_position"></property>
-                                            <property name="pane_size"></property>
-                                            <property name="permission">protected</property>
-                                            <property name="pin_button">1</property>
-                                            <property name="pos"></property>
-                                            <property name="resize">Resizable</property>
-                                            <property name="show">1</property>
-                                            <property name="size"></property>
-                                            <property name="subclass"></property>
-                                            <property name="toolbar_pane">0</property>
-                                            <property name="tooltip"></property>
-                                            <property name="window_extra_style"></property>
-                                            <property name="window_name"></property>
-                                            <property name="window_style">wxTAB_TRAVERSAL</property>
-                                            <event name="OnChar"></event>
-                                            <event name="OnEnterWindow"></event>
-                                            <event name="OnEraseBackground"></event>
-                                            <event name="OnKeyDown"></event>
-                                            <event name="OnKeyUp"></event>
-                                            <event name="OnKillFocus"></event>
-                                            <event name="OnLeaveWindow"></event>
-                                            <event name="OnLeftDClick"></event>
-                                            <event name="OnLeftDown"></event>
-                                            <event name="OnLeftUp"></event>
-                                            <event name="OnMiddleDClick"></event>
-                                            <event name="OnMiddleDown"></event>
-                                            <event name="OnMiddleUp"></event>
-                                            <event name="OnMotion"></event>
-                                            <event name="OnMouseEvents"></event>
-                                            <event name="OnMouseWheel"></event>
-                                            <event name="OnPaint"></event>
-                                            <event name="OnRightDClick"></event>
-                                            <event name="OnRightDown"></event>
-                                            <event name="OnRightUp"></event>
-                                            <event name="OnSetFocus"></event>
-                                            <event name="OnSize"></event>
-                                            <event name="OnUpdateUI"></event>
-                                            <object class="wxBoxSizer" expanded="1">
-                                                <property name="minimum_size"></property>
-                                                <property name="name">bSizer5</property>
-                                                <property name="orient">wxVERTICAL</property>
-                                                <property name="permission">none</property>
-                                                <object class="sizeritem" expanded="1">
-                                                    <property name="border">5</property>
-                                                    <property name="flag">wxALL|wxEXPAND</property>
-                                                    <property name="proportion">1</property>
-                                                    <object class="wxDataViewCtrl" expanded="1">
-                                                        <property name="bg"></property>
-                                                        <property name="context_help"></property>
-                                                        <property name="context_menu">1</property>
-                                                        <property name="enabled">1</property>
-                                                        <property name="fg"></property>
-                                                        <property name="font"></property>
-                                                        <property name="hidden">0</property>
-                                                        <property name="id">wxID_ANY</property>
-                                                        <property name="maximum_size"></property>
-                                                        <property name="minimum_size">450,250</property>
-                                                        <property name="name">m_bomView</property>
-                                                        <property name="permission">protected</property>
-                                                        <property name="pos"></property>
-                                                        <property name="size"></property>
-                                                        <property name="style">wxDV_MULTIPLE|wxDV_ROW_LINES|wxDV_VERT_RULES</property>
-                                                        <property name="subclass"></property>
-                                                        <property name="tooltip"></property>
-                                                        <property name="window_extra_style"></property>
-                                                        <property name="window_name"></property>
-                                                        <property name="window_style"></property>
-                                                        <event name="OnChar"></event>
-                                                        <event name="OnDataViewCtrlColumnHeaderClick"></event>
-                                                        <event name="OnDataViewCtrlColumnHeaderRightClick"></event>
-                                                        <event name="OnDataViewCtrlColumnReordered">OnBomColumReordered</event>
-                                                        <event name="OnDataViewCtrlColumnSorted">OnBomColumnSorted</event>
-                                                        <event name="OnDataViewCtrlItemActivated">OnTableItemActivated</event>
-                                                        <event name="OnDataViewCtrlItemBeginDrag"></event>
-                                                        <event name="OnDataViewCtrlItemCollapsed"></event>
-                                                        <event name="OnDataViewCtrlItemCollapsing"></event>
-                                                        <event name="OnDataViewCtrlItemContextMenu">OnTableItemContextMenu</event>
-                                                        <event name="OnDataViewCtrlItemDrop"></event>
-                                                        <event name="OnDataViewCtrlItemDropPossible"></event>
-                                                        <event name="OnDataViewCtrlItemEditingDone">OnTableValueChanged</event>
-                                                        <event name="OnDataViewCtrlItemEditingStarted"></event>
-                                                        <event name="OnDataViewCtrlItemExpanded"></event>
-                                                        <event name="OnDataViewCtrlItemExpanding"></event>
-                                                        <event name="OnDataViewCtrlItemStartEditing"></event>
-                                                        <event name="OnDataViewCtrlItemValueChanged"></event>
-                                                        <event name="OnDataViewCtrlSelectionChanged">OnSelectionChanged</event>
-                                                        <event name="OnEnterWindow"></event>
-                                                        <event name="OnEraseBackground"></event>
-                                                        <event name="OnKeyDown"></event>
-                                                        <event name="OnKeyUp"></event>
-                                                        <event name="OnKillFocus"></event>
-                                                        <event name="OnLeaveWindow"></event>
-                                                        <event name="OnLeftDClick"></event>
-                                                        <event name="OnLeftDown"></event>
-                                                        <event name="OnLeftUp"></event>
-                                                        <event name="OnMiddleDClick"></event>
-                                                        <event name="OnMiddleDown"></event>
-                                                        <event name="OnMiddleUp"></event>
-                                                        <event name="OnMotion"></event>
-                                                        <event name="OnMouseEvents"></event>
-                                                        <event name="OnMouseWheel"></event>
-                                                        <event name="OnPaint"></event>
-                                                        <event name="OnRightDClick"></event>
-                                                        <event name="OnRightDown"></event>
-                                                        <event name="OnRightUp"></event>
-                                                        <event name="OnSetFocus"></event>
-                                                        <event name="OnSize"></event>
-                                                        <event name="OnUpdateUI"></event>
-                                                    </object>
-                                                </object>
-                                            </object>
-                                        </object>
+                                </object>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">0</property>
+                            <object class="wxBoxSizer" expanded="1">
+                                <property name="minimum_size"></property>
+                                <property name="name">bSizer71</property>
+                                <property name="orient">wxHORIZONTAL</property>
+                                <property name="permission">none</property>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxALL</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxButton" expanded="1">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="default">0</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">ID_BUTTON_APPLY</property>
+                                        <property name="label">Apply Changes</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_applyChangesButton</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="style"></property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="validator_data_type"></property>
+                                        <property name="validator_style">wxFILTER_NONE</property>
+                                        <property name="validator_type">wxDefaultValidator</property>
+                                        <property name="validator_variable"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <event name="OnButtonClick">OnApplyFieldChanges</event>
+                                        <event name="OnChar"></event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxALL</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxButton" expanded="1">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="default">0</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">ID_BUTTON_REVERT</property>
+                                        <property name="label">Revert Changes</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_revertChangesButton</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="style"></property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="validator_data_type"></property>
+                                        <property name="validator_style">wxFILTER_NONE</property>
+                                        <property name="validator_type">wxDefaultValidator</property>
+                                        <property name="validator_variable"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <event name="OnButtonClick">OnRevertFieldChanges</event>
+                                        <event name="OnChar"></event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxEXPAND</property>
+                                    <property name="proportion">1</property>
+                                    <object class="spacer" expanded="1">
+                                        <property name="height">0</property>
+                                        <property name="permission">protected</property>
+                                        <property name="width">0</property>
+                                    </object>
+                                </object>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxALL</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxButton" expanded="1">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="default">0</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">ID_BUTTON_CLOSE</property>
+                                        <property name="label">Close</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_closeButton</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="style"></property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="validator_data_type"></property>
+                                        <property name="validator_style">wxFILTER_NONE</property>
+                                        <property name="validator_type">wxDefaultValidator</property>
+                                        <property name="validator_variable"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <event name="OnButtonClick">OnCloseButton</event>
+                                        <event name="OnChar"></event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
                                     </object>
                                 </object>
                             </object>
diff --git a/eeschema/dialogs/dialog_bom_editor_base.h b/eeschema/dialogs/dialog_bom_editor_base.h
index 4a56c1b..bfb9086 100644
--- a/eeschema/dialogs/dialog_bom_editor_base.h
+++ b/eeschema/dialogs/dialog_bom_editor_base.h
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Feb 19 2017)
+// C++ code generated with wxFormBuilder (version Apr  1 2017)
 // http://www.wxformbuilder.org/
 //
 // PLEASE DO "NOT" EDIT THIS FILE!
@@ -32,7 +32,9 @@ class DIALOG_SHIM;
 
 #define OPT_GROUP_COMPONENTS 1000
 #define ID_BUTTON_REGROUP 1001
-#define ID_BUTTON_REVERT_CHANGES 1002
+#define ID_BUTTON_APPLY 1002
+#define ID_BUTTON_REVERT 1003
+#define ID_BUTTON_CLOSE 1004
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class DIALOG_BOM_EDITOR_BASE
@@ -43,10 +45,10 @@ class DIALOG_BOM_EDITOR_BASE : public DIALOG_SHIM
 	private:
 		
 		// Private event handlers
+		void _wxFB_OnDialogClosed( wxCloseEvent& event ){ OnDialogClosed( event ); }
 		void _wxFB_OnUpdateUI( wxUpdateUIEvent& event ){ OnUpdateUI( event ); }
 		void _wxFB_OnGroupComponentsToggled( wxCommandEvent& event ){ OnGroupComponentsToggled( event ); }
 		void _wxFB_OnRegroupComponents( wxCommandEvent& event ){ OnRegroupComponents( event ); }
-		void _wxFB_OnRevertFieldChanges( wxCommandEvent& event ){ OnRevertFieldChanges( event ); }
 		void _wxFB_OnColumnItemToggled( wxDataViewEvent& event ){ OnColumnItemToggled( event ); }
 		void _wxFB_OnBomColumReordered( wxDataViewEvent& event ){ OnBomColumReordered( event ); }
 		void _wxFB_OnBomColumnSorted( wxDataViewEvent& event ){ OnBomColumnSorted( event ); }
@@ -54,6 +56,9 @@ class DIALOG_BOM_EDITOR_BASE : public DIALOG_SHIM
 		void _wxFB_OnTableItemContextMenu( wxDataViewEvent& event ){ OnTableItemContextMenu( event ); }
 		void _wxFB_OnTableValueChanged( wxDataViewEvent& event ){ OnTableValueChanged( event ); }
 		void _wxFB_OnSelectionChanged( wxDataViewEvent& event ){ OnSelectionChanged( event ); }
+		void _wxFB_OnApplyFieldChanges( wxCommandEvent& event ){ OnApplyFieldChanges( event ); }
+		void _wxFB_OnRevertFieldChanges( wxCommandEvent& event ){ OnRevertFieldChanges( event ); }
+		void _wxFB_OnCloseButton( wxCommandEvent& event ){ OnCloseButton( event ); }
 		
 	
 	protected:
@@ -62,19 +67,18 @@ class DIALOG_BOM_EDITOR_BASE : public DIALOG_SHIM
 		wxPanel* m_leftPanel;
 		wxCheckBox* m_groupComponentsBox;
 		wxButton* m_regroupComponentsButton;
-		wxButton* m_reloadTableButton;
 		wxDataViewListCtrl* m_columnListCtrl;
-		wxStdDialogButtonSizer* m_sdbSizer1;
-		wxButton* m_sdbSizer1OK;
-		wxButton* m_sdbSizer1Cancel;
 		wxPanel* m_panel4;
 		wxDataViewCtrl* m_bomView;
+		wxButton* m_applyChangesButton;
+		wxButton* m_revertChangesButton;
+		wxButton* m_closeButton;
 		
 		// Virtual event handlers, overide them in your derived class
+		virtual void OnDialogClosed( wxCloseEvent& event ) { event.Skip(); }
 		virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
 		virtual void OnGroupComponentsToggled( wxCommandEvent& event ) { event.Skip(); }
 		virtual void OnRegroupComponents( wxCommandEvent& event ) { event.Skip(); }
-		virtual void OnRevertFieldChanges( wxCommandEvent& event ) { event.Skip(); }
 		virtual void OnColumnItemToggled( wxDataViewEvent& event ) { event.Skip(); }
 		virtual void OnBomColumReordered( wxDataViewEvent& event ) { event.Skip(); }
 		virtual void OnBomColumnSorted( wxDataViewEvent& event ) { event.Skip(); }
@@ -82,11 +86,14 @@ class DIALOG_BOM_EDITOR_BASE : public DIALOG_SHIM
 		virtual void OnTableItemContextMenu( wxDataViewEvent& event ) { event.Skip(); }
 		virtual void OnTableValueChanged( wxDataViewEvent& event ) { event.Skip(); }
 		virtual void OnSelectionChanged( wxDataViewEvent& event ) { event.Skip(); }
+		virtual void OnApplyFieldChanges( wxCommandEvent& event ) { event.Skip(); }
+		virtual void OnRevertFieldChanges( wxCommandEvent& event ) { event.Skip(); }
+		virtual void OnCloseButton( wxCommandEvent& event ) { event.Skip(); }
 		
 	
 	public:
 		
-		DIALOG_BOM_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("BOM editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 1047,471 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); 
+		DIALOG_BOM_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("BOM editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 775,654 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); 
 		~DIALOG_BOM_EDITOR_BASE();
 		
 		void m_splitter1OnIdle( wxIdleEvent& )
-- 
2.7.4


Follow ups