From 8afa167e45d6f41b078a72a6ddd8c5a4ce7932fc Mon Sep 17 00:00:00 2001 From: Elian Dib <elian.di@laposte.net> Date: Tue, 26 Feb 2019 17:37:17 +0100 Subject: [PATCH] Removed unnecessary alternative (right click) behavior --- @Viewer/Viewer.m | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/@Viewer/Viewer.m b/@Viewer/Viewer.m index 360cae1..ed789ac 100644 --- a/@Viewer/Viewer.m +++ b/@Viewer/Viewer.m @@ -15,9 +15,7 @@ classdef Viewer < handle h = [] im = [] ax = [] - lx = [] - ly = [] - + slices end @@ -112,19 +110,6 @@ classdef Viewer < handle obj.im = imagesc(obj.ax,obj.slices{cv{:}}); colormap gray; axis image; - x = obj.curPos(1); - y = obj.curPos(2); - - xmin = min(obj.ax.XLim); - xmax = max(obj.ax.XLim); - ymin = min(obj.ax.YLim); - ymax = max(obj.ax.YLim); - - hold on - obj.lx = plot(obj.ax,[x,x],[ymin,ymax],'r-','Visible','off'); - obj.ly = plot(obj.ax,[xmin,xmax],[y,y],'r-','Visible','off'); - hold off - obj.h.KeyPressFcn = @obj.KeyPressCallback; obj.h.WindowButtonDownFcn = @obj.ButtonDownCallback; obj.h.WindowButtonUpFcn = @obj.ButtonUpCallback; @@ -176,19 +161,6 @@ classdef Viewer < handle obj.im.AlphaData = double(any(~isnan(obj.im.CData),3)); obj.ax.CLim = obj.range_; - - x = obj.curPos(1); - y = obj.curPos(2); - - xmin = min(obj.ax.XLim); - xmax = max(obj.ax.XLim); - ymin = min(obj.ax.YLim); - ymax = max(obj.ax.YLim); - - obj.lx.XData = [x,x]; - obj.lx.YData = [ymin,ymax]; - obj.ly.XData = [xmin,xmax]; - obj.ly.YData = [y,y]; end end @@ -213,11 +185,6 @@ classdef Viewer < handle end function ButtonDownCallback(obj,~,~) - if strcmp(obj.h.SelectionType,'alt') - obj.lx.Visible = 'on'; - obj.ly.Visible = 'on'; - end - refView = obj.curView; refPos = obj.ax.CurrentPoint(1,[2 1]); @@ -226,11 +193,6 @@ classdef Viewer < handle end function ButtonUpCallback(obj,~,~) - if strcmp(obj.h.SelectionType,'alt') - obj.lx.Visible = 'off'; - obj.ly.Visible = 'off'; - end - obj.h.WindowButtonMotionFcn = ''; end -- GitLab