| @@ -227,7 +227,7 @@ struct ModelBox : widget::OpaqueWidget { | |||||
| } | } | ||||
| void onButton(const ButtonEvent& e) override { | void onButton(const ButtonEvent& e) override { | ||||
| if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_LEFT) { | |||||
| if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_LEFT && (e.mods & RACK_MOD_MASK) == 0) { | |||||
| ModuleWidget* mw = chooseModel(model); | ModuleWidget* mw = chooseModel(model); | ||||
| // Pretend the moduleWidget was clicked so it can be dragged in the RackWidget | // Pretend the moduleWidget was clicked so it can be dragged in the RackWidget | ||||
| @@ -239,6 +239,11 @@ struct ModelBox : widget::OpaqueWidget { | |||||
| mw->dragEnabled() = false; | mw->dragEnabled() = false; | ||||
| } | } | ||||
| if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_LEFT && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { | |||||
| setFavorite(!isFavorite()); | |||||
| e.consume(this); | |||||
| } | |||||
| // Open context menu on right-click | // Open context menu on right-click | ||||
| if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_RIGHT) { | if (e.action == GLFW_PRESS && e.button == GLFW_MOUSE_BUTTON_RIGHT) { | ||||
| createContextMenu(); | createContextMenu(); | ||||
| @@ -246,6 +251,19 @@ struct ModelBox : widget::OpaqueWidget { | |||||
| } | } | ||||
| } | } | ||||
| void onHoverKey(const HoverKeyEvent& e) override { | |||||
| if (e.action == GLFW_PRESS || e.action == GLFW_REPEAT) { | |||||
| if (e.key == GLFW_KEY_F1 && (e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL) { | |||||
| system::openBrowser(model->getManualUrl()); | |||||
| e.consume(this); | |||||
| } | |||||
| } | |||||
| if (e.isConsumed()) | |||||
| return; | |||||
| OpaqueWidget::onHoverKey(e); | |||||
| } | |||||
| ui::Tooltip* createTooltip() { | ui::Tooltip* createTooltip() { | ||||
| std::string text; | std::string text; | ||||
| text += model->name; | text += model->name; | ||||