Skip to content

Commit 9afa021

Browse files
committed
Fix dropdown menus in event blocks
1 parent 2e46892 commit 9afa021

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/blocks/eventblocks.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ void EventBlocks::compileWhenTouchingObjectPredicate(Compiler *compiler)
6363
{
6464
Input *input = compiler->input(TOUCHINGOBJECTMENU);
6565

66-
if (input->type() != Input::Type::ObscuredShadow) {
67-
assert(input->pointsToDropdownMenu());
66+
if (input->pointsToDropdownMenu()) {
6867
std::string value = input->selectedMenuItem();
6968

7069
compiler->addConstValue(value);

test/blocks/event_blocks_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ class EventBlocksTest : public testing::Test
8888
else {
8989
auto input = addNullInput(block, name, id);
9090
auto menu = std::make_shared<Block>(block->id() + "_menu", block->opcode() + "_menu");
91+
menu->setShadow(true);
9192
input->setValueBlock(menu);
9293
addDropdownField(menu, name, static_cast<EventBlocks::Fields>(-1), selectedValue, static_cast<EventBlocks::FieldValues>(-1));
9394
}

0 commit comments

Comments
 (0)