prevent crash when using WM close button on "new route name contains bad chars" dialog.
The dialog would be created twice, once because the user hit enter etc. to indicate they were done editing, and once because focus left the name text entry, also indicate the end of editing. We now note that we're already processing the end of a name edit, and do nothing in that case
This commit is contained in:
parent
2d311979e3
commit
9c6a821c67
@ -27,6 +27,7 @@
|
|||||||
#include "pbd/error.h"
|
#include "pbd/error.h"
|
||||||
#include "pbd/convert.h"
|
#include "pbd/convert.h"
|
||||||
#include "pbd/stacktrace.h"
|
#include "pbd/stacktrace.h"
|
||||||
|
#include "pbd/unwind.h"
|
||||||
|
|
||||||
#include <gtkmm2ext/doi.h>
|
#include <gtkmm2ext/doi.h>
|
||||||
#include <gtkmm2ext/utils.h>
|
#include <gtkmm2ext/utils.h>
|
||||||
@ -102,6 +103,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
|
|||||||
, _y_position (0)
|
, _y_position (0)
|
||||||
, _editor (ed)
|
, _editor (ed)
|
||||||
, name_entry (0)
|
, name_entry (0)
|
||||||
|
, ending_name_edit (false)
|
||||||
, control_parent (0)
|
, control_parent (0)
|
||||||
, _order (0)
|
, _order (0)
|
||||||
, _effective_height (0)
|
, _effective_height (0)
|
||||||
@ -696,6 +698,15 @@ TimeAxisView::end_name_edit (int response)
|
|||||||
if (!name_entry) {
|
if (!name_entry) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ending_name_edit) {
|
||||||
|
/* already doing this, and focus out or other event has caused
|
||||||
|
us to re-enter this code.
|
||||||
|
*/
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
PBD::Unwinder<bool> uw (ending_name_edit, true);
|
||||||
|
|
||||||
bool edit_next = false;
|
bool edit_next = false;
|
||||||
bool edit_prev = false;
|
bool edit_prev = false;
|
||||||
|
@ -259,6 +259,7 @@ class TimeAxisView : public virtual AxisView
|
|||||||
bool name_entry_focus_out (GdkEventFocus *ev);
|
bool name_entry_focus_out (GdkEventFocus *ev);
|
||||||
|
|
||||||
Gtk::Entry* name_entry;
|
Gtk::Entry* name_entry;
|
||||||
|
bool ending_name_edit;
|
||||||
void begin_name_edit ();
|
void begin_name_edit ();
|
||||||
void end_name_edit (int);
|
void end_name_edit (int);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user