* commented out a crash line in ardour_ui2.cc (added a warning message).
(I thought, it may be fairly efficient to keep issues as code instead of putting
them in the tracker where hardly ever one would notice the needle in the haystack)
* forgot to clear two other collections on MidiPatchManager::refresh()
git-svn-id: svn://localhost/ardour2/branches/3.0@4312
d708f5d6-7413-0410-9779-
e7cbd77b26cf
set_size_request_to_display_given_text (speed_display_box, _("-0.55"), 2, 2);
const guint32 FUDGE = 25; // Combo's are stupid - they steal space from the entry for the button
set_size_request_to_display_given_text (shuttle_style_button, _("sprung"), 2+FUDGE, 10);
- reset_dpi();
+ cerr << "I commented out line line 881 in ardour_ui2.cc, because it made ardour crash somewhere in Gnome::Canvas::Text" << endl;
+ //reset_dpi();
}
void
using namespace Gnome::Canvas;
using namespace std;
-
+
void
-CanvasFlag::set_text(string& a_text)
+CanvasFlag::delete_allocated_objects()
{
if (_text) {
delete _text;
_text = 0;
}
- _text = new Text(*this, 0.0, 0.0, a_text);
+ if (_line) {
+ delete _line;
+ _line = 0;
+ }
+
+ if (_rect) {
+ delete _rect;
+ _rect = 0;
+ }
+}
+
+void
+CanvasFlag::set_text(string& a_text)
+{
+ delete_allocated_objects();
+
+ _text = new Text(*this, 0.0, 0.0, Glib::ustring(a_text));
_text->property_justification() = Gtk::JUSTIFY_CENTER;
_text->property_fill_color_rgba() = _outline_color_rgba;
double flagwidth = _text->property_text_width() + 10.0;
CanvasFlag::~CanvasFlag()
{
- delete _line;
- delete _rect;
- if(_text) {
- delete _text;
- }
+ delete_allocated_objects();
}
guint _fill_color_rgba;
private:
+ void delete_allocated_objects();
+
MidiRegionView& _region;
SimpleLine* _line;
SimpleRect* _rect;
lsb = uint8_t(lsb_control->get_float(true, event_time));
}
- //cerr << " got msb " << int(msb) << " and lsb " << int(lsb) << endl;
+ cerr << " got msb " << int(msb) << " and lsb " << int(lsb) << " thread_id: " << pthread_self() << endl;
patch = master_device->find_patch(
_custom_device_mode,
uint8_t(program_number)
);
- //cerr << " got patch with name " << patch.name() << " number " << patch.number() << endl;
}
if (patch != 0) {
+ cerr << " got patch with name " << patch->name() << " number " << patch->number() << endl;
add_pgm_change(event_time, patch->name());
} else {
char buf[4];
{
assert(time >= 0);
- // dont display notes beyond the region bounds
+ // dont display program changes beyond the region bounds
if (time - _region->start() >= _region->length() || time < _region->start())
return;
_custom_device_mode_selector.clear_items();
for (std::list<std::string>::const_iterator i = device_modes.begin(); i != device_modes.end(); ++i) {
- cerr << "found custom device mode " << *i << endl;
+ cerr << "found custom device mode " << *i << " thread_id: " << pthread_self() << endl;
_custom_device_mode_selector.append_text(*i);
}
MidiPatchManager::refresh()
{
_documents.clear();
+ _master_devices_by_model.clear();
+ _all_models.clear();
path path_to_patches = _session->session_directory().midi_patch_path();
{
_session = 0;
_documents.clear();
+ _master_devices_by_model.clear();
+ _all_models.clear();
}