diff --git a/CMakeLists.txt b/CMakeLists.txt index 8df0764d3..cd0c6d89a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ option(BUILD_DOXYGEN "Build Doxygen documentation" OFF) option(BUILD_TESTS "Build unit tests" ON) option(USE_WERROR "Error on compile warning" ON) -set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/app/node/generator/polygon/polygon.cpp b/app/node/generator/polygon/polygon.cpp index 7f99bd835..bd3ae07cf 100644 --- a/app/node/generator/polygon/polygon.cpp +++ b/app/node/generator/polygon/polygon.cpp @@ -152,6 +152,18 @@ void PolygonGenerator::GenerateFrame(FramePtr frame, const GenerateJob &job) con } } +template +NodeGizmo *PolygonGenerator::CreateAppropriateGizmo() +{ + return new T(this); +} + +template<> +NodeGizmo *PolygonGenerator::CreateAppropriateGizmo() +{ + return AddDraggableGizmo(); +} + template void PolygonGenerator::ValidateGizmoVectorSize(QVector &vec, int new_sz) { @@ -168,11 +180,7 @@ void PolygonGenerator::ValidateGizmoVectorSize(QVector &vec, int new_sz) if (old_sz < new_sz) { for (int i=old_sz; i) { - vec[i] = AddDraggableGizmo(); - } else { - vec[i] = new T(this); - } + vec[i] = static_cast(CreateAppropriateGizmo()); } } } diff --git a/app/node/generator/polygon/polygon.h b/app/node/generator/polygon/polygon.h index ff85fc8be..e1c66573a 100644 --- a/app/node/generator/polygon/polygon.h +++ b/app/node/generator/polygon/polygon.h @@ -69,6 +69,9 @@ private: template void ValidateGizmoVectorSize(QVector &vec, int new_sz); + template + NodeGizmo *CreateAppropriateGizmo(); + PathGizmo *poly_gizmo_; QVector gizmo_position_handles_; QVector gizmo_bezier_handles_; diff --git a/app/widget/timelinewidget/tool/pointer.cpp b/app/widget/timelinewidget/tool/pointer.cpp index 5e3161323..b82a8b83d 100644 --- a/app/widget/timelinewidget/tool/pointer.cpp +++ b/app/widget/timelinewidget/tool/pointer.cpp @@ -557,6 +557,10 @@ void PointerTool::FinishDrag(TimelineViewMouseEvent *event) ghost->GetAdjustedLength(), ghost->GetMode()); + if (event->GetModifiers() & Qt::ControlModifier) { + + } + c->SetTrimIsARollEdit(ghost->GetData(TimelineViewGhostItem::kTrimIsARollEdit).toBool()); command->add_child(c);