Mercurial > hg > svgui
comparison 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 |
comparison
equal
deleted
inserted
replaced
1545:bdf284b29722 | 1546:ec837d223bd9 |
---|---|
131 Event m_originalPoint; | 131 Event m_originalPoint; |
132 Event m_editingPoint; | 132 Event m_editingPoint; |
133 ChangeEventsCommand *m_editingCommand; | 133 ChangeEventsCommand *m_editingCommand; |
134 VerticalScale m_verticalScale; | 134 VerticalScale m_verticalScale; |
135 | 135 |
136 std::pair<float, float> getRange(const Event &e) const { | |
137 return { e.getValue(), e.getValue() + fabsf(e.getLevel()) }; | |
138 } | |
139 | |
136 void finish(ChangeEventsCommand *command) { | 140 void finish(ChangeEventsCommand *command) { |
137 Command *c = command->finish(); | 141 Command *c = command->finish(); |
138 if (c) CommandHistory::getInstance()->addCommand(c, false); | 142 if (c) CommandHistory::getInstance()->addCommand(c, false); |
139 } | 143 } |
140 }; | 144 }; |