Changeset e09559b in flexograder


Ignore:
Timestamp:
10/21/25 16:49:56 (3 months ago)
Author:
Enrico Schwass <ennoausberlin@…>
Branches:
master
Children:
e21ff99
Parents:
8b33905
Message:

fix copy / paste of questions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gui/gui.py

    r8b33905 re09559b  
    804804        self.clipboard = copy.deepcopy([self.require_selected_question()])
    805805        self.clipboard_action = "copy"
    806         self.clipboard_source_catalog = active.catalog_id
     806        self.clipboard_source_catalog = active.flexo_id
    807807        self.log_action(f"Copied {len(self.clipboard)} question copied.")
    808808
     
    820820
    821821        # If same catalog and copy, warn the user
    822         if target.catalog_id == self.clipboard_source_catalog and self.clipboard_action == "copy":
     822        if target.flexo_id == self.clipboard_source_catalog and self.clipboard_action == "copy":
    823823            messagebox.showwarning("Paste", "You are pasting into the same catalog.")
    824824
     
    826826        for q in self.clipboard:
    827827            new_q = copy.deepcopy(q)
    828             # Assign a fresh ID for target catalog
    829             new_q.id = target.next_question_id(new_q.domain)
     828            # FIXME: Better delegate this. Do not set it by force
     829            # Assign a fresh ID for target question
     830            new_q.flexo_id = target.next_question_id(new_q.domain)
    830831            target.add_questions([new_q])
    831832            transferred.append(new_q)
     
    846847
    847848        self.refresh_question_tree()
    848         self.log_action(f"Paste - {len(transferred)} question(s) added to '{target.catalog_id}'.")
     849        self.log_action(f"Paste - {len(transferred)} question(s) added to '{target.flexo_id}'.")
    849850
    850851    def add_domain(self):
Note: See TracChangeset for help on using the changeset viewer.