Browse Source

Don't always consume buttons in ModuleWidget.

tags/v2.1.0
Andrew Belt 2 years ago
parent
commit
1535b110cb
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      src/app/ModuleWidget.cpp

+ 5
- 3
src/app/ModuleWidget.cpp View File

@@ -378,6 +378,8 @@ void ModuleWidget::onButton(const ButtonEvent& e) {

Widget::onButton(e);
e.stopPropagating();
if (e.isConsumed())
return;

if (e.button == GLFW_MOUSE_BUTTON_LEFT) {
if (e.action == GLFW_PRESS) {
@@ -397,9 +399,9 @@ void ModuleWidget::onButton(const ButtonEvent& e) {
e.consume(this);
}

if (!e.isConsumed() && !selected) {
// Open context menu on right-click
if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_RIGHT) {
// Open context menu on right-click
if (e.button == GLFW_MOUSE_BUTTON_RIGHT && e.action == GLFW_PRESS) {
if (!selected) {
createContextMenu();
e.consume(this);
}


Loading…
Cancel
Save