From: lingutln Date: Tue, 3 Jan 2012 19:34:43 +0000 (+0000) Subject: Modified popup Exception. Done by Nikhil. X-Git-Url: http://gitweb.planteome.org/?a=commitdiff_plain;h=a11eaa9cb71f4826eb9cd7976d3d5068484a6f25;p=old-jaiswallab-svn%2F.git Modified popup Exception. Done by Nikhil. svn path=/; revision=247 --- diff --git a/Annotation/.classpath b/Annotation/.classpath index dae8e98..22412b6 100644 --- a/Annotation/.classpath +++ b/Annotation/.classpath @@ -1,11 +1,11 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/Annotation/src/ie/dcu/apps/ist/AppWindow.java b/Annotation/src/ie/dcu/apps/ist/AppWindow.java index ea03479..5e01253 100644 --- a/Annotation/src/ie/dcu/apps/ist/AppWindow.java +++ b/Annotation/src/ie/dcu/apps/ist/AppWindow.java @@ -703,15 +703,15 @@ public class AppWindow extends ApplicationWindow implements FileDropListener { } if (inside) { status(AppStatus.Information, "Location [%4d,%4d] Color [%3d,%3d,%3d]",pt.x, pt.y, c.red, c.green, c.blue); - if(view.getPainter().getMaskData().getPixel(pt.x,pt.y) == 0) - { - view.getCanvas().setToolTipText(SegmentationView.comboLabel.getText()); - return; - } - else if(view.getPainter().getMaskData().getPixel(pt.x,pt.y) == 1) - { + if(view.getPainter().getMaskData().getPixel(pt.x,pt.y) == 0 && (view.getPainter().getName().equals("Foreground Only"))) + { + view.getCanvas().setToolTipText(SegmentationView.comboLabel.getText()); + return; + } + else if(view.getPainter().getMaskData().getPixel(pt.x,pt.y) == 1) + { view.getCanvas().setToolTipText(null); - } + } } inside = true; } diff --git a/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java b/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java index da23470..3695cb8 100644 --- a/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java +++ b/Annotation/src/ie/dcu/apps/ist/views/SegmentationView.java @@ -1028,7 +1028,7 @@ public class SegmentationView extends Composite { String lab = null; if(result.comboText.indexOf('{') != -1) { - lab = result.comboText.substring(0,comboLabel.getText().indexOf('{')-1); + lab = result.comboText.substring(0,result.comboText.indexOf('{')-1); } else {