Fixed not editing when name was the same
This commit is contained in:
@@ -94,7 +94,7 @@ public class EditArtistPanel extends JFrame{
|
|||||||
boolean alreadyExists = false;
|
boolean alreadyExists = false;
|
||||||
for (Artist artist : agenda.getArtists())
|
for (Artist artist : agenda.getArtists())
|
||||||
{
|
{
|
||||||
if (artist.getName().equals(name))
|
if (artist.getName().equals(name) && !artist.equals(art))
|
||||||
{
|
{
|
||||||
alreadyExists = true;
|
alreadyExists = true;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -60,7 +60,7 @@ public class EditStagePanel extends JFrame{
|
|||||||
boolean alreadyExists = false;
|
boolean alreadyExists = false;
|
||||||
for (Stage stage : agenda.getStages())
|
for (Stage stage : agenda.getStages())
|
||||||
{
|
{
|
||||||
if (stage.getName().equals(name))
|
if (stage.getName().equals(name) && !stage.equals(sta))
|
||||||
{
|
{
|
||||||
alreadyExists = true;
|
alreadyExists = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user