diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-12-17 01:40:51 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-12-17 01:40:51 +0100 |
| commit | 235483a91d4160f4b9b2e53f1a7d5c4cb5b27925 (patch) | |
| tree | 6735b612a8d03988600b02fc186306459c07ff01 /src/tools/dcpomatic_editor.cc | |
| parent | 6e8f8563f4e4e6ff04b632aff8d6ae95de945649 (diff) | |
Refactor EditableList to take a new pair of functors for new/edit operations.
In the future this will allow more intricate text displays in
EditableLists.
Diffstat (limited to 'src/tools/dcpomatic_editor.cc')
| -rw-r--r-- | src/tools/dcpomatic_editor.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/dcpomatic_editor.cc b/src/tools/dcpomatic_editor.cc index 6c6892caa..a9b3d881a 100644 --- a/src/tools/dcpomatic_editor.cc +++ b/src/tools/dcpomatic_editor.cc @@ -221,13 +221,15 @@ public: ++r; add_label_to_sizer(sizer, this, _("Reels"), true, wxGBPosition(r, 0)); - _reels = new EditableList<shared_ptr<dcp::Reel>, ReelEditor>( + _reels = new EditableList<shared_ptr<dcp::Reel>>( this, { EditableListColumn(_("Name"), 600, true) }, [this]() { return _cpl->reels(); }, [this](vector<shared_ptr<dcp::Reel>> reels) { _cpl->set(reels); }, + EditableList<shared_ptr<dcp::Reel>>::add_with_dialog<ReelEditor>, + EditableList<shared_ptr<dcp::Reel>>::edit_with_dialog<ReelEditor>, [](shared_ptr<dcp::Reel> reel, int) { return reel->id(); }, @@ -272,7 +274,7 @@ private: wxTextCtrl* _issuer = nullptr; wxTextCtrl* _creator = nullptr; wxTextCtrl* _content_title_text = nullptr; - EditableList<shared_ptr<dcp::Reel>, ReelEditor>* _reels; + EditableList<shared_ptr<dcp::Reel>>* _reels; }; |
