Skip to content

Commit

Permalink
Merge pull request #29 from mastodon-sc/fix-blender-window-without-co…
Browse files Browse the repository at this point in the history
…lors

Show Advanced Visuals Blender Window if no color scheme is selected
  • Loading branch information
maarzt authored Oct 18, 2024
2 parents 646ea9b + 2503306 commit 50da777
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/java/org/mastodon/blender/csv/ColorSchemeDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ private ColorSchemeDialog()

/**
* Show a dialog to let the user select a coloring scheme.
*
* @param projectModel the project model
* @return the name of the selected coloring scheme, or {@code null} if none was selected.
* @return the name of the selected coloring scheme, or an empty string if the user
* selected "no coloring scheme", or {@code null} if the user canceled the dialog.
*/
public static String showDialog( ProjectModel projectModel )
{
Expand All @@ -91,8 +93,8 @@ public static String showDialog( ProjectModel projectModel )
ColorFunction selectedItem = ( ColorFunction ) comboBox.getSelectedItem();
if ( selectedItem == null )
return null;
if ( selectedItem.getGroup() == null )
return null;
if ( selectedItem instanceof EmptyColorFunction )
return "";
return selectedItem.toString();
}
return null;
Expand Down

0 comments on commit 50da777

Please sign in to comment.