Skip to content

Commit 33477b6

Browse files
committed
Fix dropdown menus in sound blocks
1 parent 247e50d commit 33477b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/blocks/soundblocks.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ bool SoundBlocks::compilePlayCommon(Compiler *compiler, bool untilDone, bool *by
6161

6262
Input *input = compiler->input(SOUND_MENU);
6363

64-
if (input->type() != Input::Type::ObscuredShadow) {
65-
assert(input->pointsToDropdownMenu());
64+
if (input->pointsToDropdownMenu()) {
6665
std::string value = input->selectedMenuItem();
6766

6867
int index = target->findSound(value);

test/blocks/sound_blocks_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class SoundBlocksTest : public testing::Test
6767
else {
6868
auto input = addNullInput(block, name, id);
6969
auto menu = std::make_shared<Block>(block->id() + "_menu", block->opcode() + "_menu");
70+
menu->setShadow(true);
7071
input->setValueBlock(menu);
7172
addDropdownField(menu, name, static_cast<SoundBlocks::Fields>(-1), selectedValue, static_cast<SoundBlocks::FieldValues>(-1));
7273
}

0 commit comments

Comments
 (0)