Quellcode durchsuchen

Check displayed profiles not all profiles for uniqueness.

Change-Id: Id577b1451efd031833f0f291ef49ee5110d987c7
Fixes-Issue: CLIENT-435
Reviewed-on: http://gerrit.dmdirc.com/3151
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.8
Greg Holmes vor 10 Jahren
Ursprung
Commit
35a55e6643

+ 8
- 0
src/com/dmdirc/addons/ui_swing/dialogs/profiles/ProfileManagerDialogLinker.java Datei anzeigen

@@ -302,6 +302,14 @@ public class ProfileManagerDialogLinker {
302 302
                 profileName.setValidation(model.isNameValid());
303 303
             }
304 304
         });
305
+        model.addPropertyChangeListener("profiles", new PropertyChangeListener() {
306
+            @Override
307
+            public void propertyChange(final PropertyChangeEvent evt) {
308
+                profileName.setText(model.getName());
309
+                profileName.setEnabled(model.isManipulateProfileAllowed());
310
+                profileName.setValidation(model.isNameValid());
311
+            }
312
+        });
305 313
         profileName.setEnabled(model.isManipulateProfileAllowed());
306 314
     }
307 315
 

+ 1
- 1
src/com/dmdirc/addons/ui_swing/dialogs/profiles/ProfileManagerModel.java Datei anzeigen

@@ -443,7 +443,7 @@ public class ProfileManagerModel {
443 443
         if (filenameValidation.isFailure()) {
444 444
             return filenameValidation;
445 445
         }
446
-        return new ProfileRenameValidator(profiles, selectedProfile).validate(
446
+        return new ProfileRenameValidator(displayedProfiles, selectedProfile).validate(
447 447
                 selectedProfile.getName());
448 448
     }
449 449
 

Laden…
Abbrechen
Speichern