Skip to content

Commit

Permalink
Consume mouse clicks when dismissing CallOutBox
Browse files Browse the repository at this point in the history
  • Loading branch information
anjaldoshi committed Sep 19, 2024
1 parent 3fe4991 commit dbcc9d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ if(MSVC)
target_compile_options(${PLUGIN_NAME} PRIVATE /sdl- /W0)

install(TARGETS ${PLUGIN_NAME} RUNTIME DESTINATION ${GUI_BIN_DIR}/plugins CONFIGURATIONS ${CMAKE_CONFIGURATION_TYPES})
install(FILES $<TARGET_PDB_FILE:${PLUGIN_NAME}> DESTINATION ${GUI_BIN_DIR}/plugins OPTIONAL)

set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../libs)
elseif(LINUX)
Expand Down
6 changes: 5 additions & 1 deletion Source/PopupConfigurationWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ void LineSelectorCustomComponent::mouseDown(const juce::MouseEvent& event)
channelSelector->setChannelButtonColour(Colour(197, 62, 199));
channelSelector->setMaximumSelectableChannels(1);

CallOutBox& myBox
CallOutBox& myBox
= CallOutBox::launchAsynchronously(std::unique_ptr<Component>(channelSelector),
getScreenBounds(),
nullptr);

myBox.setDismissalMouseClicksAreAlwaysConsumed(true);
}

void LineSelectorCustomComponent::setRowAndColumn(const int newRow, const int newColumn)
Expand Down Expand Up @@ -663,6 +665,8 @@ void TriggerSourceGenerator::buttonClicked(Button* button)
= CallOutBox::launchAsynchronously(std::unique_ptr<Component>(channelSelector),
button->getScreenBounds(),
nullptr);

myBox.setDismissalMouseClicksAreAlwaysConsumed(true);
}

}
Expand Down

0 comments on commit dbcc9d9

Please sign in to comment.