fix<PageTabBar>: show dragdrop effect only when current tab is selected

This commit is contained in:
leo 2021-08-19 11:43:14 +08:00
parent 26489a28f2
commit 16b324424c

View file

@ -251,7 +251,10 @@ namespace SourceGit.Views.Widgets {
var item = sender as ListBoxItem;
if (item == null) return;
if (Mouse.LeftButton == MouseButtonState.Pressed) {
var tab = item.DataContext as Tab;
if (tab == null || tab != container.SelectedItem) return;
if (e.LeftButton == MouseButtonState.Pressed) {
var dragging = new Controls.DragDropAdorner(item);
DragDrop.DoDragDrop(item, item.DataContext, DragDropEffects.Move);
dragging.Remove();