Skip to content

Commit 81c6210

Browse files
committed
Set the name of backdrop broadcasts
1 parent fb311bf commit 81c6210

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/scratch/costume.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Costume::Costume(const std::string &name, const std::string &id, const std::stri
1212
Asset(name, id, format),
1313
impl(spimpl::make_unique_impl<CostumePrivate>())
1414
{
15+
impl->broadcast.setName(name);
1516
}
1617

1718
/*! Returns the reciprocal of the costume scaling factor for bitmap costumes. */

test/assets/costume_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ TEST_F(CostumeTest, Broadcast)
5555
Broadcast *broadcast = costume.broadcast();
5656
ASSERT_TRUE(broadcast);
5757
ASSERT_TRUE(broadcast->id().empty());
58-
ASSERT_TRUE(broadcast->name().empty());
58+
ASSERT_EQ(broadcast->name(), "costume1");
5959
}

0 commit comments

Comments
 (0)