mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
fix crash when loading a saved visual state
This commit is contained in:
parent
412fcafda0
commit
2f71967be2
2 changed files with 5 additions and 2 deletions
|
|
@ -4383,7 +4383,7 @@ Editor::current_visual_state (bool with_tracks)
|
|||
vs->zoom_focus = zoom_focus;
|
||||
|
||||
if (with_tracks) {
|
||||
*vs->gui_state = *ARDOUR_UI::instance()->gui_object_state;
|
||||
vs->gui_state->set_state (ARDOUR_UI::instance()->gui_object_state->get_state());
|
||||
}
|
||||
|
||||
return vs;
|
||||
|
|
@ -4448,7 +4448,7 @@ Editor::use_visual_state (VisualState& vs)
|
|||
reposition_and_zoom (vs.leftmost_frame, vs.samples_per_pixel);
|
||||
|
||||
if (vs.gui_state) {
|
||||
*ARDOUR_UI::instance()->gui_object_state = *vs.gui_state;
|
||||
ARDOUR_UI::instance()->gui_object_state->set_state (vs.gui_state->get_state());
|
||||
|
||||
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
|
||||
(*i)->clear_property_cache();
|
||||
|
|
|
|||
|
|
@ -66,6 +66,9 @@ public:
|
|||
static XMLNode* get_or_add_node (XMLNode *, const std::string &);
|
||||
|
||||
private:
|
||||
// no copy construction. object_map saves pointers to _state XMLNodes
|
||||
// use set_state(get_state())
|
||||
GUIObjectState (const GUIObjectState& other);
|
||||
|
||||
XMLNode _state;
|
||||
// ideally we'd use a O(1) hash table here,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue