summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-05-08 21:12:15 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-05-08 21:12:15 +0000
commit0370943f029dbe33c92363a86138cb3f1b57baed (patch)
tree8964e84bb6d7ba3ad9b0193f8a08d069e8ce5262
parent81f095fb52c934ea1e30a42a283550990a1c899d (diff)
fix x-constrained copy-drag in same track
git-svn-id: svn://localhost/ardour2/branches/2.0.1@1797 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/editor_mouse.cc6
-rw-r--r--gtk2_ardour/redirect_box.cc25
2 files changed, 10 insertions, 21 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index 0f207df3c7..d38cf10bc9 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -3239,7 +3239,7 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
motion handler.
*/
- if (drag_info.first_move) {
+ if (drag_info.first_move && !(drag_info.copy && drag_info.x_constrained)) {
/* just a click */
goto out;
}
@@ -3315,7 +3315,7 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
boost::shared_ptr<Playlist> from_playlist = rv->region()->playlist();
boost::shared_ptr<Playlist> to_playlist = atv2->playlist();
-
+
where = (nframes_t) (unit_to_frame (ix1) * speed);
boost::shared_ptr<Region> new_region (RegionFactory::create (rv->region()));
@@ -3450,7 +3450,7 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event
}
/* add it */
-
+
latest_regionview = 0;
sigc::connection c = atv->view()->RegionViewAdded.connect (mem_fun(*this, &Editor::collect_new_region_view));
to_playlist->add_region (newregion, (nframes_t) (where * atv->get_diskstream()->speed()));
diff --git a/gtk2_ardour/redirect_box.cc b/gtk2_ardour/redirect_box.cc
index 2a69c7ffbb..a120c271d1 100644
--- a/gtk2_ardour/redirect_box.cc
+++ b/gtk2_ardour/redirect_box.cc
@@ -1066,11 +1066,7 @@ RedirectBox::edit_redirect (boost::shared_ptr<Redirect> redirect)
send_ui = reinterpret_cast<SendUIWindow *> (send->get_gui());
}
- if (send_ui->is_visible()) {
- send_ui->get_window()->raise ();
- } else {
- send_ui->show_all ();
- }
+ send_ui->present ();
} else {
@@ -1109,12 +1105,9 @@ RedirectBox::edit_redirect (boost::shared_ptr<Redirect> redirect)
} else {
plugin_ui = reinterpret_cast<PluginUIWindow *> (plugin_insert->get_gui());
}
-
- if (plugin_ui->is_visible()) {
- plugin_ui->get_window()->raise ();
- } else {
- plugin_ui->show_all ();
- }
+
+ plugin_ui->present ();
+
#ifdef HAVE_AUDIOUNIT
} else if (type == ARDOUR::AudioUnit) {
AUPluginUI* plugin_ui;
@@ -1124,7 +1117,7 @@ RedirectBox::edit_redirect (boost::shared_ptr<Redirect> redirect)
plugin_ui = reinterpret_cast<AUPluginUI*> (plugin_insert->get_gui());
}
- // raise window, somehow
+ plugin_ui->present ();
#endif
} else {
warning << "Unsupported plugin sent to RedirectBox::edit_redirect()" << endmsg;
@@ -1147,12 +1140,8 @@ RedirectBox::edit_redirect (boost::shared_ptr<Redirect> redirect)
} else {
io_selector = reinterpret_cast<PortInsertWindow *> (port_insert->get_gui());
}
-
- if (io_selector->is_visible()) {
- io_selector->get_window()->raise ();
- } else {
- io_selector->show_all ();
- }
+
+ io_selector->present ();
}
}
}