[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[tm-cvs-commit] moberhuber org.eclipse.tm.core/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas TextCanvas.java
|
- From: Eclipse CVS Genie <genie@xxxxxxxxxxx>
- Date: Wed, 26 Jan 2011 02:32:21 +0000
- Delivered-to: tm-cvs-commit@eclipse.org
Update of /cvsroot/tools/org.eclipse.tm.core/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas
In directory dev1:/tmp/cvs-serv32119/src/org/eclipse/tm/internal/terminal/textcanvas
Modified Files:
Tag: R3_2_maintenance
TextCanvas.java
Log Message:
Bug 335412 - Backport [terminal] Resizing Terminal changes Scroller location
Index: TextCanvas.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.core/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/textcanvas/TextCanvas.java,v
retrieving revision 1.21
retrieving revision 1.21.2.1
diff -C2 -d -r1.21 -r1.21.2.1
*** TextCanvas.java 19 Aug 2010 13:36:37 -0000 1.21
--- TextCanvas.java 26 Jan 2011 02:32:19 -0000 1.21.2.1
***************
*** 1,4 ****
/*******************************************************************************
! * Copyright (c) 2007, 2010 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
--- 1,4 ----
/*******************************************************************************
! * Copyright (c) 2007, 2011 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
***************
*** 14,17 ****
--- 14,18 ----
* Uwe Stieber (Wind River) - [205486] Fix ScrollLock always moving to line 1
* Anton Leherbauer (Wind River) - [219589] Copy an entire line selection
+ * Anton Leherbauer (Wind River) - [196465] Resizing Terminal changes Scroller location
*******************************************************************************/
package org.eclipse.tm.internal.terminal.textcanvas;
***************
*** 74,77 ****
--- 75,80 ----
private int fMinLines=4;
private boolean fCursorEnabled;
+ private boolean fResizing;
+
/**
* Create a new CellCanvas with the given SWT style bits.
***************
*** 95,99 ****
return;
// scroll to end (unless scroll lock is active)
! scrollToEnd();
}
});
--- 98,103 ----
return;
// scroll to end (unless scroll lock is active)
! if (!fResizing)
! scrollToEnd();
}
});
***************
*** 244,256 ****
protected void onResize() {
! onResize(false);
}
private void calculateGrid() {
setVirtualExtend(getCols()*getCellWidth(),getRows()*getCellHeight());
setRedraw(false);
try {
! // scroll to end (unless scroll lock is active)
! scrollToEnd();
getParent().layout();
} finally {
--- 248,268 ----
protected void onResize() {
! fResizing = true;
! try {
! onResize(false);
! } finally {
! fResizing = false;
! }
}
private void calculateGrid() {
+ Rectangle virtualBounds = getVirtualBounds();
setVirtualExtend(getCols()*getCellWidth(),getRows()*getCellHeight());
setRedraw(false);
try {
! // scroll to end if view port was near last line
! Rectangle viewRect = getViewRectangle();
! if (virtualBounds.height - (viewRect.y + viewRect.height) < getCellHeight() * 2)
! scrollToEnd();
getParent().layout();
} finally {