From 58076498f30500802759fdf8be8c16ec0d1e72af Mon Sep 17 00:00:00 2001 From: benfry Date: Tue, 10 May 2005 01:25:04 +0000 Subject: [PATCH] fixing some rename bugs --- app/EditorHeader.java | 3 +++ app/Sketch.java | 5 ++++- todo.txt | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/EditorHeader.java b/app/EditorHeader.java index 91445e411..9a1f4af3b 100644 --- a/app/EditorHeader.java +++ b/app/EditorHeader.java @@ -301,6 +301,9 @@ public class EditorHeader extends JComponent { item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { editor.sketch.renameCode(); + if (editor.sketch.current == editor.sketch.code[0]) { + editor.sketchbook.rebuildMenus(); + } } }); menu.add(item); diff --git a/app/Sketch.java b/app/Sketch.java index 15e38af19..e258f0b4d 100644 --- a/app/Sketch.java +++ b/app/Sketch.java @@ -521,7 +521,9 @@ public class Sketch { setCurrent(newName); // update the tabs - editor.header.repaint(); + //editor.header.repaint(); + editor.header.rebuild(); + // force the update on the mac? Toolkit.getDefaultToolkit().sync(); //editor.header.getToolkit().sync(); @@ -656,6 +658,7 @@ public class Sketch { // update the tabs setCurrent(0); editor.header.repaint(); + //editor.header.rebuild(); } diff --git a/todo.txt b/todo.txt index ad96b95ca..009e51922 100644 --- a/todo.txt +++ b/todo.txt @@ -5,6 +5,7 @@ _ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action X don't allow a file to be named .pde or .java X patch from stendahl for the highlight inset ugliness X http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Suggestions;action=display;num=1115597365;start=0 +X fix up some sketch renaming bugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .