projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tweak menu item names in group context menu to make purpose more clear to new users...
[ardour.git]
/
gtk2_ardour
/
imageframe_time_axis.cc
diff --git
a/gtk2_ardour/imageframe_time_axis.cc
b/gtk2_ardour/imageframe_time_axis.cc
index 270dd0145401fef05b695d8df514dda727c7b457..3e0f38d4be099d16e4cc3a7b3cc11f92e3f84b91 100644
(file)
--- a/
gtk2_ardour/imageframe_time_axis.cc
+++ b/
gtk2_ardour/imageframe_time_axis.cc
@@
-67,7
+67,6
@@
ImageFrameTimeAxis::ImageFrameTimeAxis(const string & track_id, PublicEditor& ed
selection_group->hide();
// intialize our data items
selection_group->hide();
// intialize our data items
- _marked_for_display = true;
y_position = -1 ;
/* create our new image frame view */
y_position = -1 ;
/* create our new image frame view */
@@
-81,6
+80,8
@@
ImageFrameTimeAxis::ImageFrameTimeAxis(const string & track_id, PublicEditor& ed
// set the initial height of this time axis
set_height(hNormal) ;
// set the initial height of this time axis
set_height(hNormal) ;
+
+ TimeAxisView::CatchDeletion.connect (*this, ui_bind (&ImageFrameTimeAxis::remove_time_axis_view, this, _1), gui_context());
}
/**
}
/**
@@
-89,7
+90,7
@@
ImageFrameTimeAxis::ImageFrameTimeAxis(const string & track_id, PublicEditor& ed
*/
ImageFrameTimeAxis::~ImageFrameTimeAxis ()
{
*/
ImageFrameTimeAxis::~ImageFrameTimeAxis ()
{
- GoingAway ; /* EMIT_SIGNAL */
+ CatchDeletion (this);
// Destroy all the marker views we may have associaited with this TimeAxis
for(MarkerTimeAxisList::iterator iter = marker_time_axis_list.begin(); iter != marker_time_axis_list.end(); ++iter)
// Destroy all the marker views we may have associaited with this TimeAxis
for(MarkerTimeAxisList::iterator iter = marker_time_axis_list.begin(); iter != marker_time_axis_list.end(); ++iter)
@@
-137,7
+138,7
@@
ImageFrameTimeAxis::set_height (uint32_t h)
}
// tell those interested that we have had our height changed
}
// tell those interested that we have had our height changed
-
gui_changed("track_height",(void*)0); /* EMIT_SIGNAL */
+ gui_changed("track_height",(void*)0); /* EMIT_SIGNAL */
}
/**
}
/**
@@
-322,8
+323,6
@@
ImageFrameTimeAxis::add_marker_time_axis(MarkerTimeAxis* marker_track, void* src
else
{
marker_time_axis_list.push_back(marker_track) ;
else
{
marker_time_axis_list.push_back(marker_track) ;
- marker_track->GoingAway.connect (*this, boost::bind (&ImageFrameTimeAxis::remove_time_axis_view, this, marker_track, (void*)this), gui_context());
-
MarkerTimeAxisAdded(marker_track, src) ; /* EMIT_SIGNAL */
ret = true ;
}
MarkerTimeAxisAdded(marker_track, src) ; /* EMIT_SIGNAL */
ret = true ;
}
@@
-390,17
+389,20
@@
ImageFrameTimeAxis::remove_named_marker_time_axis(const string & track_id, void*
* @param src the identity of the object that initiated the change
*/
void
* @param src the identity of the object that initiated the change
*/
void
-ImageFrameTimeAxis::remove_time_axis_view
(MarkerTimeAxis* mta, void* src
)
+ImageFrameTimeAxis::remove_time_axis_view
(TimeAxisView* tav
)
{
{
- ENSURE_GUI_THREAD (*this, &ImageFrameTimeAxis::remove_time_axis_view, mta, src)
+ MarkerTimeAxisView* mtav = dynamic_cast<MarkerTimeAxisView*> (tav);
+
+ if (!mtav) {
+ return;
+ }
MarkerTimeAxisList::iterator i;
MarkerTimeAxisList::iterator i;
- if((i = find (marker_time_axis_list.begin(), marker_time_axis_list.end(), mta)) != marker_time_axis_list.end())
- {
+
+
if ((i = find (marker_time_axis_list.begin(), marker_time_axis_list.end(), mta)) != marker_time_axis_list.end())
{
// note that we dont delete the object itself, we just remove it from our list
marker_time_axis_list.erase(i) ;
// note that we dont delete the object itself, we just remove it from our list
marker_time_axis_list.erase(i) ;
-
- MarkerTimeAxisRemoved(mta->name(), src) ; /* EMIT_SIGNAL */
+ MarkerTimeAxisRemoved (mta->name(), src) ; /* EMIT_SIGNAL */
}
}
}
}