You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by se...@apache.org on 2013/07/11 00:52:40 UTC

svn commit: r1502038 - /jmeter/trunk/src/core/org/apache/jmeter/gui/action/SelectTemplateDialog.java

Author: sebb
Date: Wed Jul 10 22:52:40 2013
New Revision: 1502038

URL: http://svn.apache.org/r1502038
Log:
Revert to populating the page in the init phase.
This means the selection is retained if the dialog is closed (as per original implementation)

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/SelectTemplateDialog.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/SelectTemplateDialog.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/SelectTemplateDialog.java?rev=1502038&r1=1502037&r2=1502038&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/SelectTemplateDialog.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/SelectTemplateDialog.java Wed Jul 10 22:52:40 2013
@@ -161,6 +161,7 @@ public class SelectTemplateDialog extend
     }
 
     private void init() {
+        templateList.setValues(TemplateManager.getInstance().getTemplateNames());            
         templateList.addChangeListener(this);
         reloadTemplateButton.addActionListener(this);
         this.getContentPane().setLayout(new BorderLayout(10, 10));
@@ -183,16 +184,7 @@ public class SelectTemplateDialog extend
         this.pack();
         this.setMinimumSize(new Dimension(MINIMAL_BOX_WIDTH, MINIMAL_BOX_HEIGHT));
         ComponentUtil.centerComponentInWindow(this, 50); // center position and 50% of screen size
-    }
-
-    // This is called by TemplateCommand to display the dialog
-    @Override
-    public void setVisible(boolean visible){
-        if (visible) {
-            templateList.setValues(TemplateManager.getInstance().getTemplateNames());            
-            populateTemplatePage();
-       }
-        super.setVisible(visible);
+        populateTemplatePage();
     }
 
     /**