Table -> Disable deletion by right-clicking
-
One way to disable this functionality is to edit the source code.
In the file TableEditor.cpp you can comment out the line
removeDragPoint(dp);in the if-statementif(e.mods.isRightButtonDown() || e.mods.isCommandDown())in the functionvoid TableEditor::mouseDown(const MouseEvent &e).Please note that this will affect every table and the functionality will no longer be available at the global level in HISE!
-
O Oli Ullmann has marked this topic as solved
-
@Oli-Ullmann I'm gonna add this to my own HISE build.
I personally don't like the right-click-to-remove functionality - to surprising for the user.
Left-click to add and double left-click to remove will be fine for me.
-
@dannytaurus
The whole thing isn't working optimally yet! When you right-click on a point, the curve of the point is automatically changed. However, this should only happen when you right-click-drag on the path.I'll have to take another look at that. But first I wanted to test whether I could get it to work at all... :-)
Maybe you have to insert something like
&& e.mods.isDrag()into the if statement... -
@Oli-Ullmann
Actually, I'll just be removing the right-button check fromif(e.mods.isRightButtonDown() || e.mods.isCommandDown()).So it'll just check for command being pressed:if(e.mods.isCommandDown())because I don't mind using command-click to remove a point.EDIT: nope

-
@dannytaurus
Oh yes, of course! Cool, I'll try that later too. :-) -
@Oli-Ullmann Mmmm yeah.. good point. I do want to keep the right-click to drag the curve.
-
@Oli-Ullmann I decided on removing just the remove drag section.
This should keep the ability to right-click/command-click to drag a curve, but stop either click action removing a point.
if(e.mods.isRightButtonDown() || e.mods.isCommandDown()) { # if (dp != nullptr) # { # removeDragPoint(dp); # # if (editedTable.get() != nullptr) # editedTable->sendGraphUpdateMessage(); # } lastRightDragValue = (float)e.getPosition().getY(); } -
@Christoph-Hart What are the chances of having the various clicks and drags exposed so we can customize them on a per-project basis? Or should we just override them in the plugin scripts?
-
if(e.mods.isRightButtonDown() || e.mods.isCommandDown()) { # if (dp != nullptr) # { # removeDragPoint(dp); # # if (editedTable.get() != nullptr) # editedTable->sendGraphUpdateMessage(); # } lastRightDragValue = (float)e.getPosition().getY(); }Yes, I think I tried that too, and I believe there's that unpleasant behavior with the curve when you right click on an existing point.
But I'm in the middle of another project right now and can't try it out. Maybe you can let me know when you've tried it.
-
@dannytaurus said in Table -> Disable deletion by right-clicking:
Or should we just override them in the plugin scripts?
What do you mean by that?
-
@Oli-Ullmann Oh, I just assumed we could react to mouse actions on a table in our own scripts? Maybe not. I've never done it.
-
@Oli-Ullmann said in Table -> Disable deletion by right-clicking:
Yes, I think I tried that too, and I believe there's that unpleasant behavior with the curve when you right click on an existing point.
And, yeah - you're right about that weird right-click behaviour. Every right click shifts the curve by a certain amount, probably related to the mouse Y position.
But looking more into the existing right-click-to-change-curve behaviour - I'm not sure I like that very much either. If you right-click-drag up/down to change a curve, but then drag left-right it affects all the other curves, which will probably be quite surprising to the user.
-
@dannytaurus said in Table -> Disable deletion by right-clicking:
Oh, I just assumed we could react to mouse actions on a table in our own scripts? Maybe not. I've never done it.
You can use a broadcaster. However, this only allows you to add additional functionality. I don't think this overwrites the original behavior of a table. I think you can only do this in the source code.
-
@dannytaurus said in Table -> Disable deletion by right-clicking:
And, yeah - you're right about that weird right-click behaviour. Every right click shifts the curve by a certain amount, probably related to the mouse Y position.
But looking more into the existing right-click-to-change-curve behaviour - I'm not sure I like that very much either. If you right-click-drag up/down to change a curve, but then drag left-right it affects all the other curves, which will probably be quite surprising to the user.
Yes, none of this is ideal! I'll take another look at it when I get a chance and let you know if I've been able to improve the behavior. In principle, it should be possible!
To prevent the curves of other points from changing when you drag to the left or right, you could create an index when you first click. In other words, the index of the point in question. And only this point would then be changed. I'll try to implement this when I get a chance. -
@dannytaurus said in Table -> Disable deletion by right-clicking:
right-click-to-change-curve behaviour - I'm not sure I like that very much either.
No, nor me. Having curve nodes would be much more up-to-date. Is there anyone here who could write a new table which can interface with the existing Hise modules (LFO / ShapeFX)? For $$....
-
@DanH said in Table -> Disable deletion by right-clicking:
right-click-to-change-curve behaviour
You can also use the mouse-wheel
-
@d-healey said in Table -> Disable deletion by right-clicking:
You can also use the mouse-wheel
No good for laptop users unfortunately.
-
@dannytaurus said in Table -> Disable deletion by right-clicking:
No good for laptop users unfortunately.
Most laptops have a scroll gesture, two fingers or similar. My Thinkpad has a scroll button, but I think that's uncommon.
Still clunky though.
-
@d-healey Yeah, scrolling with two fingers works like this on Mac, but that gesture doesn't trigger the curve adjustment. Not on my Mac anyway, and I don't think I've changed any of the trackpad settings. I usually like to stick to default settings as much as possible.
-
@dannytaurus You need to enable the scroll wheel behaviour with a HISE preprocessor, that might be the reason.