diff --git a/GitDiffMargin/View/EditorDiffMarginControl.xaml b/GitDiffMargin/View/EditorDiffMarginControl.xaml index dea7e4c4..483cb5d6 100644 --- a/GitDiffMargin/View/EditorDiffMarginControl.xaml +++ b/GitDiffMargin/View/EditorDiffMarginControl.xaml @@ -118,8 +118,9 @@ diff --git a/GitDiffMargin/View/EditorDiffMarginControl.xaml.cs b/GitDiffMargin/View/EditorDiffMarginControl.xaml.cs index f2b1242e..af30ac0c 100644 --- a/GitDiffMargin/View/EditorDiffMarginControl.xaml.cs +++ b/GitDiffMargin/View/EditorDiffMarginControl.xaml.cs @@ -1,5 +1,8 @@ namespace GitDiffMargin.View { + using System.Windows; + using System.Windows.Controls.Primitives; + /// /// Interaction logic for EditorDiffMarginControl.xaml /// @@ -9,5 +12,14 @@ public EditorDiffMarginControl() { InitializeComponent(); } + + private CustomPopupPlacement[] HandleCustomPopupPlacement(Size popupSize, Size targetSize, Point offset) + { + // TODO: Change vertical placement to be relative to mouse position IFF the mouse is vertically within the + // target diff glyph. + CustomPopupPlacement verticalPlacement = new CustomPopupPlacement(offset, PopupPrimaryAxis.Vertical); + CustomPopupPlacement horizontalPlacement = new CustomPopupPlacement(offset, PopupPrimaryAxis.Horizontal); + return new[] { verticalPlacement, horizontalPlacement }; + } } } \ No newline at end of file diff --git a/GitDiffMargin/ViewModel/EditorDiffMarginViewModel.cs b/GitDiffMargin/ViewModel/EditorDiffMarginViewModel.cs index 70a61562..9512615d 100644 --- a/GitDiffMargin/ViewModel/EditorDiffMarginViewModel.cs +++ b/GitDiffMargin/ViewModel/EditorDiffMarginViewModel.cs @@ -64,6 +64,7 @@ private void MoveToChange(DiffViewModel currentDiffViewModel, int indexModifier) MarginCore.MoveToChange(diffViewModel.LineNumber); ((EditorDiffViewModel)currentDiffViewModel).ShowPopup = false; + ((EditorDiffViewModel)diffViewModel).ShowPopUpCommand.Execute(this); } protected override void HandleHunksChanged(object sender, HunksChangedEventArgs e)