mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
fix<PageTabBar>: show dragdrop effect only when current tab is selected
This commit is contained in:
parent
26489a28f2
commit
16b324424c
1 changed files with 4 additions and 1 deletions
|
@ -251,7 +251,10 @@ namespace SourceGit.Views.Widgets {
|
||||||
var item = sender as ListBoxItem;
|
var item = sender as ListBoxItem;
|
||||||
if (item == null) return;
|
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);
|
var dragging = new Controls.DragDropAdorner(item);
|
||||||
DragDrop.DoDragDrop(item, item.DataContext, DragDropEffects.Move);
|
DragDrop.DoDragDrop(item, item.DataContext, DragDropEffects.Move);
|
||||||
dragging.Remove();
|
dragging.Remove();
|
||||||
|
|
Loading…
Reference in a new issue