Linking the GridColumnPicker to FlattenerGrid killed the ability for the
FlattenerGrid to fall back to the IDL column label when no label was
defined in the markup. This change adds a reloadStructure operation to
GridColumnPicker. FlattenerGrid uses this to pass the updated column
labels (and any other changes) to gridcolumnpicker, which then updates
the grid display to match.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
}), this.query
);
+ // pick up any column label changes
+ this.columnPicker.reloadStructure();
+
this._showing_create_pane = false;
this.overrideEditWidgets = {};
};
},
+ /** Loads the current grid structure and passes the
+ * structure back to the grid to force a UI refresh.
+ * This is necessary if external forces alter the structure.
+ */
+ reloadStructure : function() {
+ this.structure = this.grid.structure;
+ this.cells = this.structure[0].cells[0].slice();
+ this.grid.setStructure(this.structure);
+ },
+
// determine the visible sorting from the
// view and update our list of cells to match
refreshCells : function() {