This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 109098
Collapse All | Expand All

(-)Central.java (+10 lines)
Lines 570-578 Link Here
570
                //mkleint since one cannot close the sliding mode just like that, we don't need to check the previous mode of the tc.
570
                //mkleint since one cannot close the sliding mode just like that, we don't need to check the previous mode of the tc.
571
                model.removeModeTopComponent(mode, tc, null);
571
                model.removeModeTopComponent(mode, tc, null);
572
                String id = WindowManagerImpl.getInstance().findTopComponentID(tc);
572
                String id = WindowManagerImpl.getInstance().findTopComponentID(tc);
573
                if((tc.getPersistenceType()!=TopComponent.PERSISTENCE_ALWAYS)){
573
                PersistenceManager.getDefault().removeGlobalTopComponentID(id);
574
                PersistenceManager.getDefault().removeGlobalTopComponentID(id);
574
            }
575
            }
575
        }
576
        }
577
        }
576
        
578
        
577
        ModeImpl oldActive = getActiveMode();
579
        ModeImpl oldActive = getActiveMode();
578
        ModeImpl newActive;
580
        ModeImpl newActive;
Lines 891-898 Link Here
891
        }
893
        }
892
        model.removeModeTopComponent(mode, tc, recentTc);
894
        model.removeModeTopComponent(mode, tc, recentTc);
893
        String id = WindowManagerImpl.getInstance().findTopComponentID(tc);
895
        String id = WindowManagerImpl.getInstance().findTopComponentID(tc);
896
        /** BugId #109098 
897
         * make sure you call this only on TCs that are NOT TC.PERSISTENT_ALWAYS
898
         */
899
        if((tc.getPersistenceType()!=TopComponent.PERSISTENCE_ALWAYS)){
894
        PersistenceManager.getDefault().removeGlobalTopComponentID(id);
900
        PersistenceManager.getDefault().removeGlobalTopComponentID(id);
901
        }
895
902
903
896
        ModeImpl oldActive = getActiveMode();
904
        ModeImpl oldActive = getActiveMode();
897
        ModeImpl newActive;
905
        ModeImpl newActive;
898
        if(model.getModeOpenedTopComponents(mode).isEmpty() && mode == oldActive) {
906
        if(model.getModeOpenedTopComponents(mode).isEmpty() && mode == oldActive) {
Lines 1185-1192 Link Here
1185
                    } else {
1193
                    } else {
1186
                        model.removeModeTopComponent(mode, tc, null);
1194
                        model.removeModeTopComponent(mode, tc, null);
1187
                        String id = WindowManagerImpl.getInstance().findTopComponentID(tc);
1195
                        String id = WindowManagerImpl.getInstance().findTopComponentID(tc);
1196
                        if((tc.getPersistenceType()!=TopComponent.PERSISTENCE_ALWAYS)){
1188
                        PersistenceManager.getDefault().removeGlobalTopComponentID(id);
1197
                        PersistenceManager.getDefault().removeGlobalTopComponentID(id);
1189
                    }
1198
                    }
1199
                    }
1190
                    closedTcs.add(tc);
1200
                    closedTcs.add(tc);
1191
                }
1201
                }
1192
            }
1202
            }

Return to bug 109098