Resize session dialog back to initial height and width on "back"

This fixes an issue where the size of the window stayed much larger
than its content if there are no sessions in the session search path
after attempting to make a new session and then pressing "back"
This commit is contained in:
Nikolaus Gullotta 2020-02-06 14:38:02 -06:00
parent 5fb38c7c53
commit a13fabf344
2 changed files with 6 additions and 0 deletions

View File

@ -141,6 +141,8 @@ SessionDialog::SessionDialog (bool require_new, const std::string& session_name,
recent_label.hide ();
}
}
inital_height = get_height();
inital_width = get_width();
}
SessionDialog::SessionDialog ()
@ -517,6 +519,7 @@ SessionDialog::back_button_pressed (GdkEventButton*)
get_vbox()->remove (session_new_vbox);
back_button->set_sensitive (false);
get_vbox()->pack_start (ic_vbox);
resize(inital_height, inital_width);
return true;
}

View File

@ -198,6 +198,9 @@ private:
bool info_scroller_update();
sigc::connection info_scroller_connection;
void updates_button_clicked ();
int inital_height;
int inital_width;
};
#endif /* __gtk2_ardour_session_dialog_h__ */