* fixed missing track color mode persistence
git-svn-id: svn://localhost/ardour2/branches/3.0@4357 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
cca4f22141
commit
22d73333c6
@ -28,6 +28,7 @@
|
||||
#include <pbd/error.h>
|
||||
#include <pbd/stl_delete.h>
|
||||
#include <pbd/whitespace.h>
|
||||
#include <pbd/enumwriter.h>
|
||||
|
||||
#include <gtkmm2ext/gtk_ui.h>
|
||||
#include <gtkmm2ext/selector.h>
|
||||
@ -181,6 +182,13 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session& sess, boost::shar
|
||||
_channel_selector.mode_changed.connect(
|
||||
mem_fun(*midi_track()->midi_diskstream(), &MidiDiskstream::set_channel_mode));
|
||||
|
||||
XMLProperty *prop;
|
||||
if ((prop = xml_node->property ("color-mode")) != 0) {
|
||||
_color_mode = ColorMode (string_2_enum(prop->value(), _color_mode));
|
||||
if (_color_mode == ChannelColors) {
|
||||
_channel_selector.set_channel_colors(CanvasNoteEvent::midi_channel_colors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MidiTimeAxisView::~MidiTimeAxisView ()
|
||||
@ -306,7 +314,7 @@ MidiTimeAxisView::build_automation_action_menu ()
|
||||
}
|
||||
|
||||
Gtk::Menu*
|
||||
MidiTimeAxisView::build_mode_menu()
|
||||
MidiTimeAxisView::build_note_mode_menu()
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
|
||||
@ -377,6 +385,7 @@ MidiTimeAxisView::set_color_mode(ColorMode mode)
|
||||
}
|
||||
|
||||
_color_mode = mode;
|
||||
xml_node->add_property ("color-mode", enum_2_string(_color_mode));
|
||||
_view->redisplay_diskstream();
|
||||
}
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ class MidiTimeAxisView : public RouteTimeAxisView
|
||||
|
||||
void append_extra_display_menu_items ();
|
||||
void build_automation_action_menu ();
|
||||
Gtk::Menu* build_mode_menu();
|
||||
Gtk::Menu* build_note_mode_menu();
|
||||
Gtk::Menu* build_color_mode_menu();
|
||||
|
||||
void set_note_mode (ARDOUR::NoteMode mode);
|
||||
|
@ -575,8 +575,6 @@ RouteTimeAxisView::build_display_menu ()
|
||||
if (mode_menu)
|
||||
items.push_back (MenuElem (_("Mode"), *mode_menu));
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
color_mode_menu = build_color_mode_menu();
|
||||
if (color_mode_menu)
|
||||
items.push_back (MenuElem (_("Color Mode"), *color_mode_menu));
|
||||
|
@ -50,6 +50,7 @@ setup_enum_writer ()
|
||||
TrackMode _TrackMode;
|
||||
NoteMode _NoteMode;
|
||||
ChannelMode _ChannelMode;
|
||||
ColorMode _ColorMode;
|
||||
MeterFalloff _MeterFalloff;
|
||||
MeterHold _MeterHold;
|
||||
EditMode _EditMode;
|
||||
@ -163,6 +164,11 @@ setup_enum_writer ()
|
||||
REGISTER_ENUM (ForceChannel);
|
||||
REGISTER (_ChannelMode);
|
||||
|
||||
REGISTER_ENUM (MeterColors);
|
||||
REGISTER_ENUM (ChannelColors);
|
||||
REGISTER_ENUM (TrackColor);
|
||||
REGISTER (_ColorMode);
|
||||
|
||||
REGISTER_ENUM (MeterFalloffOff);
|
||||
REGISTER_ENUM (MeterFalloffSlowest);
|
||||
REGISTER_ENUM (MeterFalloffSlow);
|
||||
|
Loading…
Reference in New Issue
Block a user