summaryrefslogtreecommitdiff
path: root/src/wx/markers_panel.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-12-23 00:07:25 +0100
committerCarl Hetherington <cth@carlh.net>2025-12-23 00:07:25 +0100
commitd2b7059dae5a440f0a44f2ad8e7b1f0e834a7a9e (patch)
tree4c9c18102e6daa020429a9c70b99f8a9a2e9554d /src/wx/markers_panel.cc
parent79a262837eb94facf447c6dd77fb0ff9db658d8a (diff)
Display markers in the player (#2793).
The space above the position slider was already reserved, but nothing would be shown there.
Diffstat (limited to 'src/wx/markers_panel.cc')
-rw-r--r--src/wx/markers_panel.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wx/markers_panel.cc b/src/wx/markers_panel.cc
index e01d3bc28..021128ddf 100644
--- a/src/wx/markers_panel.cc
+++ b/src/wx/markers_panel.cc
@@ -55,9 +55,10 @@ enum {
};
-MarkersPanel::MarkersPanel(wxWindow* parent, FilmViewer& viewer)
+MarkersPanel::MarkersPanel(wxWindow* parent, FilmViewer& viewer, bool allow_editing)
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(-1, 40))
, _viewer(viewer)
+ , _allow_editing(allow_editing)
{
Bind(wxEVT_PAINT, boost::bind(&MarkersPanel::paint, this));
Bind(wxEVT_MOTION, boost::bind(&MarkersPanel::mouse_moved, this, _1));
@@ -267,6 +268,10 @@ MarkersPanel::mouse_left_down()
void
MarkersPanel::mouse_right_down(wxMouseEvent& ev)
{
+ if (!_allow_editing) {
+ return;
+ }
+
wxMenu menu;
if (_over) {
DCPOMATIC_ASSERT(_over->marker);