*/
+#ifndef DCPOMATIC_AUTO_CROP_DIALOG_H
+#define DCPOMATIC_AUTO_CROP_DIALOG_H
+
+
#include "table_dialog.h"
#include "lib/crop.h"
#include <boost/signals2.hpp>
SpinCtrl* _threshold;
};
+
+#endif
+
auto const crop = guess_crop_for_content ();
update_viewer (crop);
- if (_auto_crop_dialog) {
- _auto_crop_dialog->Destroy();
- _auto_crop_dialog = nullptr;
- }
- _auto_crop_dialog = new AutoCropDialog (_parent, crop);
+ _auto_crop_dialog.reset(_parent, crop);
_auto_crop_dialog->Show ();
/* Update the dialog and view when the crop threshold changes */
#define DCPOMATIC_CONTENT_MENU_H
+#include "auto_crop_dialog.h"
#include "timeline_content_view.h"
+#include "wx_ptr.h"
#include "lib/types.h"
#include <dcp/warnings.h>
LIBDCP_DISABLE_WARNINGS
#include <memory>
-class AutoCropDialog;
class DCPContent;
class Film;
class FilmViewer;
wxMenuItem* _set_dcp_settings;
wxMenuItem* _remove;
- AutoCropDialog* _auto_crop_dialog = nullptr;
+ wx_ptr<AutoCropDialog> _auto_crop_dialog;
boost::signals2::scoped_connection _auto_crop_config_connection;
boost::signals2::scoped_connection _auto_crop_viewer_connection;
};