Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2004-04-30 17:53:54 -0400
committerAndre Weinand2004-04-30 17:53:54 -0400
commitf24aedb3eaaa238da1eec7bb7729e1dacaba9ba6 (patch)
tree235378da77573e86453f5307d17d78c5c22692f2 /bundles/org.eclipse.compare/compare
parent8b20c761e5b8e9646b1b71ee8bdd790a92672bb6 (diff)
downloadeclipse.platform.team-f24aedb3eaaa238da1eec7bb7729e1dacaba9ba6.tar.gz
eclipse.platform.team-f24aedb3eaaa238da1eec7bb7729e1dacaba9ba6.tar.xz
eclipse.platform.team-f24aedb3eaaa238da1eec7bb7729e1dacaba9ba6.zip
fixed #60383
Diffstat (limited to 'bundles/org.eclipse.compare/compare')
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java36
1 files changed, 19 insertions, 17 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
index 384cdafb5..b65d1cdad 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
@@ -1089,18 +1089,20 @@ public class TextMergeViewer extends ContentMergeViewer {
final ScrollBar sb1= st1.getHorizontalBar();
sb1.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
- int max= sb1.getMaximum()-sb1.getThumb();
- double v= 0.0;
- if (max > 0)
- v= (float)sb1.getSelection() / (float)max;
- if (st2.isVisible()) {
- ScrollBar sb2= st2.getHorizontalBar();
- st2.setHorizontalPixel((int)((sb2.getMaximum()-sb2.getThumb()) * v));
- }
- if (st3.isVisible()) {
- ScrollBar sb3= st3.getHorizontalBar();
- st3.setHorizontalPixel((int)((sb3.getMaximum()-sb3.getThumb()) * v));
- }
+ if (fSynchronizedScrolling) {
+ int max= sb1.getMaximum()-sb1.getThumb();
+ double v= 0.0;
+ if (max > 0)
+ v= (float)sb1.getSelection() / (float)max;
+ if (st2.isVisible()) {
+ ScrollBar sb2= st2.getHorizontalBar();
+ st2.setHorizontalPixel((int)((sb2.getMaximum()-sb2.getThumb()) * v));
+ }
+ if (st3.isVisible()) {
+ ScrollBar sb3= st3.getHorizontalBar();
+ st3.setHorizontalPixel((int)((sb3.getMaximum()-sb3.getThumb()) * v));
+ }
+ }
}
});
}
@@ -1334,7 +1336,7 @@ public class TextMergeViewer extends ContentMergeViewer {
fCanvas= c;
}
public void mouseMove(MouseEvent e) {
- if (!fIsDown && showResolveUI() && handleMouseMoveOverCenter(fCanvas, e.x, e.y))
+ if (!fIsDown && fUseSingleLine && showResolveUI() && handleMouseMoveOverCenter(fCanvas, e.x, e.y))
return;
super.mouseMove(e);
}
@@ -1351,9 +1353,7 @@ public class TextMergeViewer extends ContentMergeViewer {
paintCenter(this, gc);
}
};
- if (!fUseResolveUI) {
- new Resizer(canvas, HORIZONTAL);
- } else {
+ if (fUseResolveUI) {
new HoverResizer(canvas, HORIZONTAL);
@@ -1374,6 +1374,8 @@ public class TextMergeViewer extends ContentMergeViewer {
}
}
);
+ } else {
+ new Resizer(canvas, HORIZONTAL);
}
return canvas;
@@ -3296,7 +3298,7 @@ public class TextMergeViewer extends ContentMergeViewer {
}
}
- if (showResolveUI && diff.isUnresolvedIncomingOrConflicting()) {
+ if (fUseSingleLine && showResolveUI && diff.isUnresolvedIncomingOrConflicting()) {
// draw resolve state
int cx= (w-RESOLVE_SIZE)/2;
int cy= ((ly+lh/2) + (ry+rh/2) - RESOLVE_SIZE)/2;

Back to the top