mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
Reset RouteDialog: name edited by-user
* after each "Add" operation * when cleaning the name field
This commit is contained in:
parent
28a7e4a3e0
commit
201d536ee9
3 changed files with 17 additions and 5 deletions
|
|
@ -280,7 +280,7 @@ AddRouteDialog::~AddRouteDialog ()
|
||||||
void
|
void
|
||||||
AddRouteDialog::on_response (int r)
|
AddRouteDialog::on_response (int r)
|
||||||
{
|
{
|
||||||
name_edited_by_user = false;
|
reset_name_edited ();
|
||||||
/* Don't call ArdourDialog::on_response() because that will
|
/* Don't call ArdourDialog::on_response() because that will
|
||||||
automatically hide the dialog.
|
automatically hide the dialog.
|
||||||
*/
|
*/
|
||||||
|
|
@ -421,13 +421,21 @@ AddRouteDialog::trk_template_row_selected ()
|
||||||
void
|
void
|
||||||
AddRouteDialog::name_template_entry_insertion (Glib::ustring const &,int*)
|
AddRouteDialog::name_template_entry_insertion (Glib::ustring const &,int*)
|
||||||
{
|
{
|
||||||
name_edited_by_user = true;
|
if (name_template ().empty ()) {
|
||||||
|
name_edited_by_user = false;
|
||||||
|
} else {
|
||||||
|
name_edited_by_user = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AddRouteDialog::name_template_entry_deletion (int, int)
|
AddRouteDialog::name_template_entry_deletion (int, int)
|
||||||
{
|
{
|
||||||
name_edited_by_user = true;
|
if (name_template ().empty ()) {
|
||||||
|
name_edited_by_user = false;
|
||||||
|
} else {
|
||||||
|
name_edited_by_user = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -509,7 +517,8 @@ AddRouteDialog::maybe_update_name_template_entry ()
|
||||||
name_template_entry.set_text (VCA::default_name_template());
|
name_template_entry.set_text (VCA::default_name_template());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
name_edited_by_user = false;
|
/* ignore programatic change, restore false */
|
||||||
|
reset_name_edited ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -698,7 +707,7 @@ void
|
||||||
AddRouteDialog::on_show ()
|
AddRouteDialog::on_show ()
|
||||||
{
|
{
|
||||||
routes_spinner.grab_focus ();
|
routes_spinner.grab_focus ();
|
||||||
name_edited_by_user = false;
|
reset_name_edited ();
|
||||||
|
|
||||||
refill_route_groups ();
|
refill_route_groups ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,8 @@ public:
|
||||||
|
|
||||||
std::string get_template_path();
|
std::string get_template_path();
|
||||||
|
|
||||||
|
void reset_name_edited () { name_edited_by_user = false; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Gtk::Entry name_template_entry;
|
Gtk::Entry name_template_entry;
|
||||||
Gtk::Adjustment routes_adjustment;
|
Gtk::Adjustment routes_adjustment;
|
||||||
|
|
|
||||||
|
|
@ -4449,6 +4449,7 @@ ARDOUR_UI::add_route_dialog_response (int r)
|
||||||
|
|
||||||
switch (r) {
|
switch (r) {
|
||||||
case AddRouteDialog::Add:
|
case AddRouteDialog::Add:
|
||||||
|
add_route_dialog->reset_name_edited ();
|
||||||
break;
|
break;
|
||||||
case AddRouteDialog::AddAndClose:
|
case AddRouteDialog::AddAndClose:
|
||||||
add_route_dialog->ArdourDialog::on_response (r);
|
add_route_dialog->ArdourDialog::on_response (r);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue