implemented correct value changing in the CurveView widget

This commit is contained in:
itsmattkc
2019-12-30 22:22:30 +11:00
parent 0db13a96ab
commit 570fa4e5b0
4 changed files with 40 additions and 16 deletions
@@ -15,6 +15,8 @@ public:
virtual void Clear();
void SetYScale(const double& y_scale);
public slots:
void RemoveKeyframe(NodeKeyframePtr key);
@@ -31,6 +33,10 @@ protected:
virtual void KeyframeAboutToBeRemoved(NodeKeyframe* key);
void SetYAxisEnabled(bool e);
double y_scale_;
private:
rational CalculateNewTimeFromScreen(const rational& old_time, double cursor_diff);
@@ -46,6 +52,7 @@ private:
KeyframeViewItem* key;
qreal item_x;
rational time;
double value;
};
QMap<NodeKeyframe*, KeyframeViewItem*> item_map_;
@@ -60,6 +67,8 @@ private:
QVector<KeyframeItemAndTime> selected_keys_;
bool y_axis_enabled_;
private slots:
void ShowContextMenu();