Issue #247 Project tree is not scrolled to the selected Document Class position on start

This commit is contained in:
Jindra Pet��k
2013-07-19 12:06:12 +02:00
parent 88eb4c5511
commit 58e8295a2a
@@ -496,11 +496,15 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Fr
public void hilightScript(ScriptPack pack) {
TagTreeModel ttm = (TagTreeModel) Main.mainFrame.tagTree.getModel();
TreePath tp = ttm.getTagPath(pack);
if (tp == null) {
}
Main.mainFrame.tagTree.setSelectionPath(tp);
Main.mainFrame.tagTree.scrollPathToVisible(tp);
final TreePath tp = ttm.getTagPath(pack);
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
Main.mainFrame.tagTree.setSelectionPath(tp);
Main.mainFrame.tagTree.scrollPathToVisible(tp);
}
});
}
public void updateSearchPos() {