change: change code style to Linux style except indent.
This commit is contained in:
@@ -21,29 +21,31 @@
|
||||
#include "beam.h"
|
||||
#include "widget/timelinewidget/timelinewidget.h"
|
||||
|
||||
namespace olive {
|
||||
namespace olive
|
||||
{
|
||||
|
||||
BeamTool::BeamTool(TimelineWidget *parent) :
|
||||
TimelineTool(parent)
|
||||
BeamTool::BeamTool(TimelineWidget *parent)
|
||||
: TimelineTool(parent)
|
||||
{
|
||||
}
|
||||
|
||||
void BeamTool::HoverMove(TimelineViewMouseEvent *event)
|
||||
{
|
||||
parent()->SetViewBeamCursor(ValidatedCoordinate(event->GetCoordinates(true)));
|
||||
parent()->SetViewBeamCursor(
|
||||
ValidatedCoordinate(event->GetCoordinates(true)));
|
||||
}
|
||||
|
||||
TimelineCoordinate BeamTool::ValidatedCoordinate(TimelineCoordinate coord)
|
||||
{
|
||||
if (Core::instance()->snapping()) {
|
||||
rational movement;
|
||||
parent()->SnapPoint({coord.GetFrame()}, &movement);
|
||||
if (!movement.isNull()) {
|
||||
coord.SetFrame(coord.GetFrame() + movement);
|
||||
}
|
||||
}
|
||||
if (Core::instance()->snapping()) {
|
||||
rational movement;
|
||||
parent()->SnapPoint({ coord.GetFrame() }, &movement);
|
||||
if (!movement.isNull()) {
|
||||
coord.SetFrame(coord.GetFrame() + movement);
|
||||
}
|
||||
}
|
||||
|
||||
return coord;
|
||||
return coord;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user