docs: def onImport(self, event):
          """
          Import a MagIC-format file
          """
          if self.grid.changes:
              print("-W- Your changes will be overwritten...")
              wind = pw.ChooseOne(self, "Import file anyway", "Save grid first",
                                  "-W- Your grid has unsaved changes which will be overwritten if you import a file now...")
              wind.Centre()
              res = wind.ShowModal()
              # save grid first:
              if res == wx.ID_NO:
                  self.onSave(None, alert=True, destroy=False)
                  # reset self.changes
                  self.grid.changes = set()
  
          openFileDialog = wx.FileDialog(self, "Open MagIC-format file", self.WD, "",
                                         "MagIC file|*.*", wx.FD_OPEN | wx.FD_FILE_MUST_EXIST)
          result = openFileDialog.ShowModal()
          if result == wx.ID_OK:
              # get filename
              filename = openFileDialog.GetPath()
              # make sure the dtype is correct
              f = open(filename)
              line = f.readline()
              if line.startswith("tab"):
                  delim, dtype = line.split("\t")
              else:
                  delim, dtype = line.split("")
              f.close()
              dtype = dtype.strip()
              if (dtype != self.grid_type) and (dtype + "s" != self.grid_type):
                  text = "You are currently editing the {} grid, but you are trying to import a {} file.\nPlease open the {} grid and then re-try this import.".format(self.grid_type, dtype, dtype)
                  pw.simple_warning(text)
                  return
              # grab old data for concatenation
              if self.grid_type in self.contribution.tables:
                  old_df_container = self.contribution.tables[self.grid_type]
              else:
                  old_df_container = None
              old_col_names = self.grid.col_labels
              # read in new file and update contribution
              df_container = cb.MagicDataFrame(filename, dmodel=self.dm,
                                               columns=old_col_names)
              # concatenate if possible
              if not isinstance(old_df_container, type(None)):
                  df_container.df = pd.concat([old_df_container.df, df_container.df],
                                              axis=0, sort=True)
              self.contribution.tables[df_container.dtype] = df_container
              self.grid_builder = GridBuilder(self.contribution, self.grid_type,
                                              self.panel, parent_type=self.parent_type,
                                              reqd_headers=self.reqd_headers)
              # delete old grid
              self.grid_box.Hide(0)
              self.grid_box.Remove(0)
              # create new, updated grid
              self.grid = self.grid_builder.make_grid()
              self.grid.InitUI()
              # add data to new grid
              self.grid_builder.add_data_to_grid(self.grid, self.grid_type)
              # add new grid to sizer and fit everything
              self.grid_box.Add(self.grid, flag=wx.ALL, border=5)
              self.main_sizer.Fit(self)
              self.Centre()
              # add any needed drop-down-menus
              self.drop_down_menu = drop_down_menus.Menus(self.grid_type,
                                                          self.contribution,
                                                          self.grid)
              # done!
          return