Skip to content

Commit

Permalink
An mnu option to add timing tracks to all views xLightsSequencer#4666
Browse files Browse the repository at this point in the history
  • Loading branch information
derwin12 authored and dkulp committed Jan 25, 2025
1 parent db26970 commit 16064a5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions xLights/sequencer/RowHeading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const long RowHeading::ID_ROW_MNU_DELETE_MODEL_NODE_EFFECTS = wxNewId();
const long RowHeading::ID_ROW_MNU_SELECT_ROW_EFFECTS = wxNewId();
const long RowHeading::ID_ROW_MNU_SELECT_MODEL_EFFECTS = wxNewId();
const long RowHeading::ID_ROW_MNU_SELECT_TIMING_EFFECTS = wxNewId();
const long RowHeading::ID_ROW_MNU_ADD_TIMING_TRACK_ALL_VIEWS = wxNewId();
const long RowHeading::ID_ROW_MNU_MODEL_CONVERTTOPERMODEL = wxNewId();
const long RowHeading::ID_ROW_MNU_ROW_CONVERTTOPERMODEL = wxNewId();
const long RowHeading::ID_ROW_MNU_RENDERENABLE_ALL = wxNewId();
Expand Down Expand Up @@ -470,6 +471,7 @@ void RowHeading::rightClick( wxMouseEvent& event)
if (mSequenceElements->GetCurrentView() == MASTER_VIEW) {
mnuLayer.Append(ID_ROW_MNU_HIDEALLTIMING, "Hide All Timing Tracks");
}
mnuLayer.Append(ID_ROW_MNU_ADD_TIMING_TRACK_ALL_VIEWS, "Add Timing Tracks to All Views");
mnuLayer.Append(ID_ROW_MNU_SELECT_TIMING_EFFECTS, "Select Timing Marks");
mnuLayer.Append(ID_ROW_MNU_IMPORT_NOTES, "Import Notes");
mnuLayer.AppendSeparator();
Expand Down Expand Up @@ -1107,6 +1109,17 @@ void RowHeading::OnLayerPopup(wxCommandEvent& event)
for (int i = 0; i < element->GetEffectLayerCount(); i++) {
element->GetEffectLayer(i)->SelectAllEffects();
}
} else if (id == ID_ROW_MNU_ADD_TIMING_TRACK_ALL_VIEWS) {
mSequenceElements->get_undo_mgr().CreateUndoStep();
mSequenceElements->GetXLightsFrame()->AbortRender();
for (int i = 0; i < mSequenceElements->GetElementCount(); i++) {
Element* e = mSequenceElements->GetElement(i);
if (e->GetType() == ElementType::ELEMENT_TYPE_TIMING) {
if (e->GetVisible()) {
mSequenceElements->AddTimingToAllViews(e->GetName());
}
}
}
} else if (id == ID_ROW_MNU_DELETE_MODEL_EFFECTS) {
wxCommandEvent eventUnSelected(EVT_UNSELECTED_EFFECT);
m_parent->ProcessWindowEvent(eventUnSelected);
Expand Down
1 change: 1 addition & 0 deletions xLights/sequencer/RowHeading.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ class RowHeading : public wxWindow
static const long ID_ROW_MNU_SELECT_ROW_EFFECTS;
static const long ID_ROW_MNU_SELECT_MODEL_EFFECTS;
static const long ID_ROW_MNU_SELECT_TIMING_EFFECTS;
static const long ID_ROW_MNU_ADD_TIMING_TRACK_ALL_VIEWS;
static const long ID_ROW_MNU_MODEL_CONVERTTOPERMODEL;
static const long ID_ROW_MNU_ROW_CONVERTTOPERMODEL;

Expand Down

0 comments on commit 16064a5

Please sign in to comment.