Changeset 254


Ignore:
Timestamp:
11/15/02 15:06:39 (20 years ago)
Author:
piso
Message:

actionPerformed(): use Frame.promoteSecondaryBuffers().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/j/LocationBar.java

    r250 r254  
    33 *
    44 * Copyright (C) 2002 Peter Graves
    5  * $Id: LocationBar.java,v 1.2 2002-11-15 02:03:37 piso Exp $
     5 * $Id: LocationBar.java,v 1.3 2002-11-15 15:06:39 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    164164    public void actionPerformed(ActionEvent e)
    165165    {
     166        final Frame frame = editor.getFrame();
     167
    166168        // Before we close the editor, if either the editor being closed or the
    167169        // other editor in the same frame is looking at a secondary buffer,
    168170        // promote it.
    169         Buffer buffer = editor.getBuffer();
    170         if (buffer.isSecondary())
    171             buffer.promote();
    172         Editor ed = editor.getOtherEditor();
    173         if (ed != null) {
    174             buffer = editor.getBuffer();
    175             if (buffer.isSecondary())
    176                 buffer.promote();
    177         }
     171        frame.promoteSecondaryBuffers();
    178172
    179         final Frame frame = editor.getFrame();
    180173        frame.closeEditor(editor);
    181174        frame.getCurrentEditor().setFocusToDisplay();
Note: See TracChangeset for help on using the changeset viewer.