fix drag handle segv, new app icons
[goodguy/history.git] / cinelerra-5.1 / cinelerra / mainsession.C
index bab1e227ed8390d491c15bac1f5b0f347977615a..4bfda7b05dcd5b17339ec7bc02c788126c62f5ac 100644 (file)
  *
  */
 
+#include "auto.h"
 #include "bcdisplayinfo.h"
 #include "clip.h"
 #include "bchash.h"
+#include "edit.h"
+#include "edits.h"
 #include "edl.h"
 #include "edlsession.h"
 #include "guicast.h"
@@ -30,7 +33,7 @@
 #include "meterpanel.h"
 #include "mwindow.h"
 #include "mwindowgui.h"
-#include "auto.h"
+#include "plugin.h"
 
 MainSession::MainSession(MWindow *mwindow)
 {
@@ -569,3 +572,20 @@ int MainSession::save_defaults(BC_Hash *defaults)
 
        return 0;
 }
+
+Track *MainSession::drag_handle_track()
+{
+       Track *track = 0;
+       switch( current_operation ) {
+       case DRAG_EDITHANDLE1:
+       case DRAG_EDITHANDLE2:
+               track = drag_edit->edits->track;
+               break;
+       case DRAG_PLUGINHANDLE1:
+       case DRAG_PLUGINHANDLE2:
+               track = drag_plugin->edits->track;
+               break;
+       }
+       return track;
+}
+