projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Supporters update.
[dcpomatic.git]
/
src
/
wx
/
language_tag_widget.cc
diff --git
a/src/wx/language_tag_widget.cc
b/src/wx/language_tag_widget.cc
index 567b1fefab15b31eb935e6bdd50ae571addec84c..17683daf1e966bf35747cc7b66e75908aa0d18db 100644
(file)
--- a/
src/wx/language_tag_widget.cc
+++ b/
src/wx/language_tag_widget.cc
@@
-23,6
+23,7
@@
#include "language_tag_dialog.h"
#include "language_tag_widget.h"
#include "wx_util.h"
#include "language_tag_dialog.h"
#include "language_tag_widget.h"
#include "wx_util.h"
+#include "lib/scope_guard.h"
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <wx/wx.h>
@@
-55,21
+56,21
@@
LanguageTagWidget::LanguageTagWidget (wxWindow* parent, wxString tooltip, option
}
}
-LanguageTagWidget::~LanguageTagWidget
()
+LanguageTagWidget::~LanguageTagWidget()
{
{
- _language->Destroy
();
- _edit->Destroy
();
+ _language->Destroy();
+ _edit->Destroy();
}
void
LanguageTagWidget::edit ()
{
}
void
LanguageTagWidget::edit ()
{
- auto d =
new LanguageTagDialog
(_parent, _tag.get_value_or(dcp::LanguageTag("en")));
- d->ShowModal ();
-
set
(d->get());
-
Changed
(d->get());
- d->Destroy ();
+ auto d =
make_wx<LanguageTagDialog>
(_parent, _tag.get_value_or(dcp::LanguageTag("en")));
+ if (d->ShowModal() == wxID_OK) {
+
set
(d->get());
+
Changed
(d->get());
+ }
}
}