all time-based panels are now derived from a common base class
Cuts down on a lot of duplicate code between TimelineWidget/ViewerWidget/CurveWidget/NodeParamView and TimelinePanel/ViewerPanel/CurvePanel/ParamPanel since they all use similar time functions.
This commit is contained in:
@@ -58,7 +58,7 @@ TimeRuler::TimeRuler(bool text_visible, bool cache_status_visible, QWidget* pare
|
||||
UpdateHeight();
|
||||
}
|
||||
|
||||
const double &TimeRuler::scale()
|
||||
const double &TimeRuler::GetScale()
|
||||
{
|
||||
return scale_;
|
||||
}
|
||||
@@ -174,7 +174,7 @@ void TimeRuler::paintEvent(QPaintEvent *)
|
||||
}
|
||||
|
||||
if (short_interval < minimum_gap_between_lines_) {
|
||||
if (long_interval == -1) {
|
||||
if (long_interval <= 0) {
|
||||
do {
|
||||
short_interval *= 2;
|
||||
} while (short_interval < minimum_gap_between_lines_);
|
||||
|
||||
@@ -34,7 +34,7 @@ class TimeRuler : public QWidget
|
||||
public:
|
||||
TimeRuler(bool text_visible = true, bool cache_status_visible = false, QWidget* parent = nullptr);
|
||||
|
||||
const double& scale();
|
||||
const double& GetScale();
|
||||
void SetScale(const double& d);
|
||||
|
||||
void SetTimebase(const rational& r);
|
||||
|
||||
Reference in New Issue
Block a user