summaryrefslogtreecommitdiffstats
path: root/scilab/modules
diff options
context:
space:
mode:
authorCalixte DENIZET <calixte@contrib.scilab.org>2011-05-10 17:07:56 +0200
committerCalixte DENIZET <calixte@contrib.scilab.org>2011-05-10 17:07:56 +0200
commitf1d75e451c224807b309816e24b930f086b14045 (patch)
treebdd22ac0112fbc24c3995ac6610a67c63ca01489 /scilab/modules
parent58c8c65f6056add83e6905a6178d0eef2cf9d291 (diff)
downloadscilab-f1d75e451c224807b309816e24b930f086b14045.zip
scilab-f1d75e451c224807b309816e24b930f086b14045.tar.gz
Bug 9442 fixed: Sometimes an exception could thrown in the console
Change-Id: Iae2cb84d4099c72def67c6ca6e0b11ac1ed52b5a
Diffstat (limited to 'scilab/modules')
-rw-r--r--scilab/modules/console/src/java/org/scilab/modules/console/SciInputCommandView.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/scilab/modules/console/src/java/org/scilab/modules/console/SciInputCommandView.java b/scilab/modules/console/src/java/org/scilab/modules/console/SciInputCommandView.java
index 4fa7d6b..7b5abe2 100644
--- a/scilab/modules/console/src/java/org/scilab/modules/console/SciInputCommandView.java
+++ b/scilab/modules/console/src/java/org/scilab/modules/console/SciInputCommandView.java
@@ -275,7 +275,15 @@ public class SciInputCommandView extends ConsoleTextPane implements InputCommand
275 * {@inheritDoc} 275 * {@inheritDoc}
276 */ 276 */
277 public Dimension getPreferredSize() { 277 public Dimension getPreferredSize() {
278 Dimension dim = super.getPreferredSize(); 278 Dimension dim;
279 try {
280 dim = super.getPreferredSize();
281 } catch (Exception e) {
282 // workaround bug 9442
283 // Should be removed with JDK 7
284 dim = new Dimension(0, 0);
285 }
286
279 if (height != -1) { 287 if (height != -1) {
280 dim.height = Math.max(height, dim.height); 288 dim.height = Math.max(height, dim.height);
281 } 289 }