Don't dynamically allocate ShuttleCtrl
With manage() both the button and shuttle were free'ed when the table was destroyed.
This commit is contained in:
parent
0a167f5c99
commit
58124e7544
|
@ -167,7 +167,6 @@ typedef uint64_t microseconds_t;
|
|||
#include "session_dialog.h"
|
||||
#include "session_metadata_dialog.h"
|
||||
#include "session_option_editor.h"
|
||||
#include "shuttle_control.h"
|
||||
#include "speaker_dialog.h"
|
||||
#include "splash.h"
|
||||
#include "startup.h"
|
||||
|
@ -828,7 +827,7 @@ ARDOUR_UI::set_transport_controllable_state (const XMLNode& node)
|
|||
rec_controllable->set_id (prop->value());
|
||||
}
|
||||
if ((prop = node.property ("shuttle")) != 0) {
|
||||
shuttle_box->controllable()->set_id (prop->value());
|
||||
shuttle_box.controllable()->set_id (prop->value());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -852,7 +851,7 @@ ARDOUR_UI::get_transport_controllable_state ()
|
|||
node->add_property (X_("play_selection"), buf);
|
||||
rec_controllable->id().print (buf, sizeof (buf));
|
||||
node->add_property (X_("rec"), buf);
|
||||
shuttle_box->controllable()->id().print (buf, sizeof (buf));
|
||||
shuttle_box.controllable()->id().print (buf, sizeof (buf));
|
||||
node->add_property (X_("shuttle"), buf);
|
||||
|
||||
return *node;
|
||||
|
@ -2513,7 +2512,7 @@ ARDOUR_UI::map_transport_state ()
|
|||
return;
|
||||
}
|
||||
|
||||
shuttle_box->map_transport_state ();
|
||||
shuttle_box.map_transport_state ();
|
||||
|
||||
float sp = _session->transport_speed();
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
#include "ardour_window.h"
|
||||
#include "editing.h"
|
||||
#include "enums.h"
|
||||
#include "shuttle_control.h"
|
||||
#include "visibility_group.h"
|
||||
#include "window_manager.h"
|
||||
|
||||
|
@ -126,7 +127,6 @@ class PublicEditor;
|
|||
class SaveAsDialog;
|
||||
class SessionDialog;
|
||||
class SessionOptionEditorWindow;
|
||||
class ShuttleControl;
|
||||
class Splash;
|
||||
class MiniTimeline;
|
||||
class Meterbridge;
|
||||
|
@ -528,7 +528,7 @@ private:
|
|||
void toggle_time_master ();
|
||||
void toggle_video_sync ();
|
||||
|
||||
ShuttleControl* shuttle_box;
|
||||
ShuttleControl shuttle_box;
|
||||
|
||||
ArdourButton auto_return_button;
|
||||
ArdourButton follow_edits_button;
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
#include "theme_manager.h"
|
||||
#include "midi_tracer.h"
|
||||
#include "mini_timeline.h"
|
||||
#include "shuttle_control.h"
|
||||
#include "global_port_matrix.h"
|
||||
#include "location_ui.h"
|
||||
#include "rc_option_editor.h"
|
||||
|
@ -395,7 +394,6 @@ ARDOUR_UI::setup_transport ()
|
|||
punch_button_size_group->add_widget (punch_in_button);
|
||||
punch_button_size_group->add_widget (punch_out_button);
|
||||
|
||||
shuttle_box = manage (new ShuttleControl);
|
||||
mini_timeline = manage (new MiniTimeline);
|
||||
|
||||
/* and now the layout... */
|
||||
|
@ -463,8 +461,8 @@ ARDOUR_UI::setup_transport ()
|
|||
HBox* ssbox = manage (new HBox);
|
||||
ssbox->set_spacing (PX_SCALE(2));
|
||||
ssbox->pack_start (sync_button, false, false, 0);
|
||||
ssbox->pack_start (*shuttle_box, true, true, 0);
|
||||
ssbox->pack_start (*shuttle_box->info_button(), false, false, 0);
|
||||
ssbox->pack_start (shuttle_box, true, true, 0);
|
||||
ssbox->pack_start (*shuttle_box.info_button(), false, false, 0);
|
||||
|
||||
|
||||
/* and the main table layout */
|
||||
|
@ -716,7 +714,7 @@ void
|
|||
ARDOUR_UI::set_transport_sensitivity (bool yn)
|
||||
{
|
||||
ActionManager::set_sensitive (ActionManager::transport_sensitive_actions, yn);
|
||||
shuttle_box->set_sensitive (yn);
|
||||
shuttle_box.set_sensitive (yn);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -108,9 +108,7 @@ ARDOUR_UI::set_session (Session *s)
|
|||
|
||||
AutomationWatch::instance().set_session (s);
|
||||
|
||||
if (shuttle_box) {
|
||||
shuttle_box->set_session (s);
|
||||
}
|
||||
shuttle_box.set_session (s);
|
||||
|
||||
primary_clock->set_session (s);
|
||||
secondary_clock->set_session (s);
|
||||
|
|
Loading…
Reference in New Issue