Skip to content

Commit

Permalink
Fix buttons with no icon
Browse files Browse the repository at this point in the history
  • Loading branch information
EspeuteClement committed Apr 17, 2023
1 parent a892bbe commit 12532ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hide/comp/Toolbar.hx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Toolbar extends Component {

public function addButton( icon : String, ?label : String, ?onClick : Void -> Void, ?rightClick : Void -> Void ) {
var e = new Element('<div class="button2" title="${label==null ? "" : label}"></div>');
if (icon != "") {
if (icon != "" && icon != null) {
e.append(new Element('<div class="icon ico ico-$icon"/>'));
}
else {
Expand Down
4 changes: 2 additions & 2 deletions hide/view/Prefab.hx
Original file line number Diff line number Diff line change
Expand Up @@ -476,11 +476,11 @@ class Prefab extends FileView {

toolsDefs.push({id: "", title : "", icon : "", type : Separator});

toolsDefs.push({id: "graphicsFilters", title : "Graphics filters", type : Menu(filtersToMenuItem(graphicsFilters, "Graphics"))});
toolsDefs.push({id: "graphicsFilters", title : "Graphics filters", type : Popup((e) -> new FiltersPopup(null, e, this, sceneFilters, "Graphics"))});

toolsDefs.push({id: "", title : "", icon : "", type : Separator});

toolsDefs.push({id: "sceneFilters", title : "Scene filters", type : Menu(filtersToMenuItem(sceneFilters, "Scene"))});
toolsDefs.push({id: "sceneFilters", title : "Scene filters", type : Popup((e) -> new FiltersPopup(null, e, this, sceneFilters, "Scene"))});

toolsDefs.push({id: "", title : "", icon : "", type : Separator});

Expand Down

0 comments on commit 12532ba

Please sign in to comment.