Mercurial > hg > svgui
diff layer/BoxLayer.h @ 1546:ec837d223bd9
Update getPointToDrag to prefer boxes that are containing the mouse position in height as well as width
author | Chris Cannam |
---|---|
date | Thu, 17 Oct 2019 10:26:21 +0100 |
parents | 2e94c268f7a0 |
children | e6362cf5ff1d |
line wrap: on
line diff
--- a/layer/BoxLayer.h Wed Oct 16 16:20:12 2019 +0100 +++ b/layer/BoxLayer.h Thu Oct 17 10:26:21 2019 +0100 @@ -133,6 +133,10 @@ ChangeEventsCommand *m_editingCommand; VerticalScale m_verticalScale; + std::pair<float, float> getRange(const Event &e) const { + return { e.getValue(), e.getValue() + fabsf(e.getLevel()) }; + } + void finish(ChangeEventsCommand *command) { Command *c = command->finish(); if (c) CommandHistory::getInstance()->addCommand(c, false);