[Summary] Fixing the bugs:

1) State of Skip lane was not saved in session.
2) Hidden Marker lane header did hide upon session loaded.
This commit is contained in:
Valeriy Kamyshniy 2015-02-02 01:36:48 +02:00
parent d25ea799f4
commit d2858b33bb
4 changed files with 15 additions and 6 deletions

View file

@ -270,7 +270,6 @@ Editor::Editor ()
, _master_bus_ui_home (get_container ("master_bus_ui_home"))
, vpacker (get_v_box ("vpacker"))
, timebars_vbox (get_v_box ("timebars_vbox"))
, marker_lane_hbox (get_container ("marker_lane_hbox"))
, skip_button (get_waves_button ("skip_button"))
, add_marker_button (get_waves_button ("add_marker_button"))
, global_solo_button (get_waves_button ("global_solo_button"))

View file

@ -713,7 +713,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
MasterBusUI* _master_bus_ui;
Gtk::VBox& vpacker;
Gtk::VBox& timebars_vbox;
Gtk::Container& marker_lane_hbox;
WavesButton& skip_button;
std::stack<Gdk::Cursor*> _cursor_stack;

View file

@ -263,6 +263,7 @@ Editor::store_ruler_visibility ()
node->add_property (X_("tempo"), ruler_tempo_action->get_active() ? "yes": "no");
node->add_property (X_("meter"), ruler_meter_action->get_active() ? "yes": "no");
node->add_property (X_("marker"), ruler_marker_action->get_active() ? "yes": "no");
node->add_property (X_("skip"), ruler_skip_action->get_active() ? "yes": "no");
node->add_property (X_("rangemarker"), ruler_range_action->get_active() ? "yes": "no");
node->add_property (X_("transportmarker"), ruler_loop_punch_action->get_active() ? "yes": "no");
node->add_property (X_("cdmarker"), ruler_cd_marker_action->get_active() ? "yes": "no");
@ -330,6 +331,13 @@ Editor::restore_ruler_visibility ()
ruler_marker_action->set_active (false);
}
}
if ((prop = node->property ("skip")) != 0) {
if (string_is_affirmative (prop->value())) {
ruler_skip_action->set_active (true);
} else {
ruler_skip_action->set_active (false);
}
}
if ((prop = node->property ("rangemarker")) != 0) {
if (string_is_affirmative (prop->value())) {
ruler_range_action->set_active (true);
@ -391,17 +399,18 @@ Editor::update_ruler_visibility ()
double pos = 0.0;
double old_unit_pos;
Gtk::Container& skip_playback_lane = get_container ("skip_playback_lane");
Gtk::Container& marker_lane = get_container ("marker_lane");
if (ruler_marker_action->get_active()) {
old_unit_pos = marker_group->position().y;
if (pos != old_unit_pos) {
marker_group->move (ArdourCanvas::Duple (0.0, pos - old_unit_pos));
}
marker_lane_hbox.show ();
marker_lane.show ();
marker_group->show();
pos += marker_height; // marker_bar->y0() - marker_bar->y1();
} else {
marker_lane_hbox.hide ();
marker_lane.hide ();
marker_group->hide();
}

View file

@ -458,7 +458,8 @@
table.xfill="false"
table.yfill="false">
<VBox id="timebars_vbox">
<VBox id="marker_lane_hbox">
<VBox id="marker_lane"
noshowall="true">
<EventBox height="1"
bgnormal="#424242"/>
<EventBox bgnormal="#6C6C6C">
@ -531,7 +532,8 @@
</HBox>
</EventBox>
</VBox>
<VBox id="skip_playback_lane">
<VBox id="skip_playback_lane"
noshowall="true">
<EventBox height="1"
bgnormal="#424242"/>
<EventBox bgnormal="#6C6C6C">