def import_selected_pane(self):
        pane = self.selected_pane
        matches = pane.matches
        matches = [
            (e, ref) for ref, e in matches
            if e is not None and e not in self.import_table.dont_import]
        if pane.selected_target is not None:
            # We import in an existing account, adjust all the transactions accordingly
            target_account = pane.selected_target
        else:
            target_account = None
        self.document.import_entries(target_account, pane.account, matches)
        self.mainwindow.revalidate()
        self.close_pane(self.selected_pane_index)
        self.view.close_selected_tab()