Changeset 6948 for branches/3.5-stable


Ignore:
Timestamp:
Sep 10, 2015, 2:26:07 PM (6 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1953: Trashcan.delete() does not preserve the currently active project

The secondary session is now activated with the same project as the main session has active (if any).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.5-stable/src/core/net/sf/basedb/core/Trashcan.java

    r6444 r6948  
    212212    int numRemoved = 0;
    213213    int removedInTransaction = 0;
     214    int projectId = sc.getActiveProjectId();
    214215
    215216    DbControl dc = null;
     
    232233        try
    233234        {
     235          if (projectId != 0 && sc2.getActiveProjectId() != projectId)
     236          {
     237            sc2.setActiveProject(Project.getById(dc, projectId));
     238          }
     239
    234240          removedInTransaction = 0;
    235241          Iterator<Identifiable> iterator = itemsToRemove.iterator();
Note: See TracChangeset for help on using the changeset viewer.