closeView(alignPanel);
}
}
-
if (closeAllTabs)
{
+ if (featureSettings != null && featureSettings.isOpen())
+ {
+ featureSettings.close();
+ featureSettings = null;
+ }
/*
* this will raise an INTERNAL_FRAME_CLOSED event and this method will
* be called recursively, with the frame now in 'closed' state
}
// FIXME: ideally should use UI interface API
- FeatureSettings viewFeatureSettings = af.featureSettings;
+ FeatureSettings viewFeatureSettings = (af.featureSettings != null
+ && af.featureSettings.isOpen())
+ ? af.featureSettings
+ : null;
Rectangle fsBounds = af.getFeatureSettingsGeometry();
for (int i = 0; i < size; i++)
{
// transfer reference for existing feature settings to new alignFrame
if (ap == af.alignPanel)
{
- newaf.featureSettings = (viewFeatureSettings.fr.ap == ap)
- ? viewFeatureSettings
- : null;
+ if (viewFeatureSettings != null && viewFeatureSettings.fr.ap == ap)
+ {
+ newaf.featureSettings = viewFeatureSettings;
+ }
newaf.setFeatureSettingsGeometry(fsBounds);
}
}
}
+ af.featureSettings = null;
af.alignPanels.clear();
af.closeMenuItem_actionPerformed(true);