Fix save/restore window and tab sizes
Window size has to be set before calling `setup_toplevel_window()`. and `set_show_tabs()` - see alsoacf13e9498
and42cb321039
. This also unconditionally saves the current settings to global config instant.xml. This was previously only done in rare cases when first closing the session and then quitting Ardour.
This commit is contained in:
parent
96a9c1df7f
commit
1228202bbe
@ -445,7 +445,7 @@ private:
|
||||
void toggle_meterbridge ();
|
||||
|
||||
int setup_windows ();
|
||||
int apply_window_settings (bool);
|
||||
void apply_window_settings (bool);
|
||||
void setup_transport ();
|
||||
void setup_clock ();
|
||||
|
||||
|
@ -344,6 +344,7 @@ ARDOUR_UI::setup_windows ()
|
||||
_main_window.add (main_vpacker);
|
||||
transport_frame.show_all ();
|
||||
|
||||
apply_window_settings (true);
|
||||
|
||||
setup_toplevel_window (_main_window, "", this);
|
||||
_main_window.show_all ();
|
||||
@ -360,16 +361,16 @@ ARDOUR_UI::setup_windows ()
|
||||
LV2Plugin::set_main_window_id (GDK_DRAWABLE_XID(_main_window.get_window()->gobj()));
|
||||
#endif
|
||||
|
||||
return apply_window_settings (true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
void
|
||||
ARDOUR_UI::apply_window_settings (bool with_size)
|
||||
{
|
||||
const XMLNode* mnode = main_window_settings ();
|
||||
|
||||
if (!mnode) {
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
XMLProperty const* prop;
|
||||
@ -428,7 +429,7 @@ ARDOUR_UI::apply_window_settings (bool with_size)
|
||||
} else if (editor) {
|
||||
_tabs.set_current_page (_tabs.page_num (editor->contents()));
|
||||
}
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -965,7 +965,10 @@ ARDOUR_UI::save_ardour_state ()
|
||||
vkstate.add_child_nocopy (virtual_keyboard_window.get_state ());
|
||||
_session->add_instant_xml (vkstate);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
/* save current Window settings and sizes for new sessions */
|
||||
{
|
||||
Config->add_instant_xml (main_window_node);
|
||||
Config->add_instant_xml (enode);
|
||||
Config->add_instant_xml (mnode);
|
||||
|
Loading…
Reference in New Issue
Block a user