summaryrefslogtreecommitdiffstats
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
parent58c8c65f6056add83e6905a6178d0eef2cf9d291 (diff)
downloadscilab-f1d75e451c224807b309816e24b930f086b14045.zip
scilab-f1d75e451c224807b309816e24b930f086b14045.tar.gz
Bug 9442 fixed: Sometimes an exception could thrown in the console
Change-Id: Iae2cb84d4099c72def67c6ca6e0b11ac1ed52b5a
-rw-r--r--scilab/CHANGES_5.3.X2
-rw-r--r--scilab/modules/console/src/java/org/scilab/modules/console/SciInputCommandView.java10
2 files changed, 10 insertions, 2 deletions
diff --git a/scilab/CHANGES_5.3.X b/scilab/CHANGES_5.3.X
index 7db1876..7827ecd 100644
--- a/scilab/CHANGES_5.3.X
+++ b/scilab/CHANGES_5.3.X
@@ -359,7 +359,7 @@ Bug Fixes:
359 359
360* Bug 9300 fixed - Scilab crashed when one tried to complete an empty mlist. 360* Bug 9300 fixed - Scilab crashed when one tried to complete an empty mlist.
361 361
362 362* Bug 9442 fixed - Sometimes, an exception could be thrown in the console.
363 363
364 364
365 Changes between versions 5.3.0 and 5.3.1 of Scilab 365 Changes between versions 5.3.0 and 5.3.1 of Scilab
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 }