ContentMenu::ContentMenu (wxWindow* p)
: _menu (new wxMenu)
, _parent (p)
+ , _pop_up_open (false)
{
_repeat = _menu->Append (ID_repeat, _("Repeat..."));
_join = _menu->Append (ID_join, _("Join"));
_remove->Enable (!_content.empty ());
+ _pop_up_open = true;
_parent->PopupMenu (_menu, p);
+ _pop_up_open = false;
}
void
if (d->ShowModal() == wxID_OK) {
try {
- dcp->add_kdm (dcp::EncryptedKDM (dcp::file_to_string (wx_to_std (d->GetPath ()))));
+ dcp->add_kdm (dcp::EncryptedKDM (dcp::file_to_string (wx_to_std (d->GetPath ()), MAX_KDM_SIZE)));
} catch (exception& e) {
error_dialog (_parent, wxString::Format (_("Could not load KDM (%s)"), e.what ()));
d->Destroy ();
void
ContentMenu::cpl_selected (wxCommandEvent& ev)
{
+ if (!_pop_up_open) {
+ return;
+ }
+
DCPOMATIC_ASSERT (!_content.empty ());
shared_ptr<DCPContent> dcp = dynamic_pointer_cast<DCPContent> (_content.front ());
DCPOMATIC_ASSERT (dcp);