@ -15,6 +15,7 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext ;
import com.fr.design.mainframe.JTemplate ;
import com.fr.design.mainframe.TemplateSavingChecker ;
import com.fr.design.mainframe.manager.search.TemplateTreeSearchManager ;
import com.fr.design.utils.DesignUtils ;
import com.fr.design.utils.gui.GUICoreUtils ;
import com.fr.design.utils.gui.GUIPaintUtils ;
@ -258,6 +259,11 @@ public class MutilTempalteTabPane extends JComponent {
@Override
public void actionPerformed ( ActionEvent e ) {
//处于搜索模式时,先退出搜索模式,再定位
if ( TemplateTreeSearchManager . getInstance ( ) . isInSearchMode ( ) ) {
TemplateTreeSearchManager . getInstance ( ) . outOfSearchMode ( ) ;
TemplateTreePane . getInstance ( ) . refreshDockingView ( ) ;
}
JTemplate < ? , ? > template = openedTemplate . get ( this . tplIndex ) ;
super . gotoEditingTemplateLeaf ( template . getPath ( ) ) ;
}
@ -287,7 +293,7 @@ public class MutilTempalteTabPane extends JComponent {
JTemplate < ? , ? > currentTemplate = HistoryTemplateListCache . getInstance ( ) . getCurrentEditingTemplate ( ) ;
closeTemplate ( templates , currentTemplate ) ;
if ( currentTemplate = = nu ll) {
if ( option = = CloseOption . A ll) {
DesignerContext . getDesignerFrame ( ) . addAndActivateJTemplate ( ) ;
} else {
DesignerContext . getDesignerFrame ( ) . activateJTemplate ( currentTemplate ) ;