File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/main/java/com/evacipated/cardcrawl/modthespire/ui Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -330,12 +330,16 @@ private JPanel makeModListPanel()
330
330
JButton addProfile = new JButton ("+" );
331
331
JButton delProfile = new JButton ("-" );
332
332
333
+ TextFieldWithPlaceholder filter = new TextFieldWithPlaceholder ();
334
+ filter .setPlaceholder ("Filter..." );
335
+
333
336
profilesList .addActionListener ((ActionEvent event ) -> {
334
337
String profileName = (String ) profilesList .getSelectedItem ();
335
338
delProfile .setEnabled (!ModList .DEFAULT_LIST .equals (profileName ));
336
339
ModList newList = new ModList (profileName );
337
340
DefaultListModel <ModPanel > newModel = (DefaultListModel <ModPanel >) modList .getModel ();
338
341
newList .loadModsInOrder (newModel , info , modList );
342
+ filter .setText ("" );
339
343
340
344
Thread tCfg = new Thread (() -> {
341
345
// Save new load order cfg
@@ -393,8 +397,6 @@ private JPanel makeModListPanel()
393
397
});
394
398
profilesPanel .add (delProfile , c );
395
399
396
- TextFieldWithPlaceholder filter = new TextFieldWithPlaceholder ();
397
- filter .setPlaceholder ("Filter..." );
398
400
Runnable filterModList = () -> {
399
401
String filterText = filter .getText ().trim ().toLowerCase ();
400
402
String [] filterKeys = filterText .length () == 0 ? null : filterText .split ("\\ s+" );
You can’t perform that action at this time.
0 commit comments