Changeset 250


Ignore:
Timestamp:
11/15/02 02:03:37 (20 years ago)
Author:
piso
Message:

actionPerformed(): before we close the editor, if either the editor being
closed or the other editor in the same frame is looking at a secondary buffer,
promote it.

File:
1 edited

Legend:

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

    r2 r250  
    33 *
    44 * Copyright (C) 2002 Peter Graves
    5  * $Id: LocationBar.java,v 1.1.1.1 2002-09-24 16:08:30 piso Exp $
     5 * $Id: LocationBar.java,v 1.2 2002-11-15 02:03:37 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    164164    public void actionPerformed(ActionEvent e)
    165165    {
     166        // Before we close the editor, if either the editor being closed or the
     167        // other editor in the same frame is looking at a secondary buffer,
     168        // 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        }
     178
    166179        final Frame frame = editor.getFrame();
    167180        frame.closeEditor(editor);
Note: See TracChangeset for help on using the changeset viewer.