fixed #713
This commit is contained in:
@@ -113,6 +113,10 @@ void free_panels() {
|
||||
}
|
||||
|
||||
void scroll_to_frame_internal(QScrollBar* bar, long frame, double zoom, int area_width) {
|
||||
if (bar->value() == bar->minimum() || bar->value() == bar->maximum()) {
|
||||
return;
|
||||
}
|
||||
|
||||
int screen_point = getScreenPointFromFrame(zoom, frame) - bar->value();
|
||||
int min_x = area_width*0.1;
|
||||
int max_x = area_width-min_x;
|
||||
|
||||
@@ -419,5 +419,14 @@ QObject* GetAudioWakeObject()
|
||||
|
||||
void SetAudioWakeObject(QObject *o)
|
||||
{
|
||||
audio_wake_mutex.lock();
|
||||
audio_wake_object = o;
|
||||
audio_wake_mutex.unlock();
|
||||
}
|
||||
|
||||
void WakeAudioWakeObject() {
|
||||
QObject* audio_wake_object = GetAudioWakeObject();
|
||||
if (audio_wake_object != nullptr) {
|
||||
QMetaObject::invokeMethod(audio_wake_object, "play_wake", Qt::QueuedConnection);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@ void clear_audio_ibuffer();
|
||||
|
||||
QObject *GetAudioWakeObject();
|
||||
void SetAudioWakeObject(QObject* o);
|
||||
void WakeAudioWakeObject();
|
||||
|
||||
int current_audio_freq();
|
||||
|
||||
|
||||
@@ -461,10 +461,7 @@ void Cacher::CacheAudioWorker() {
|
||||
}
|
||||
|
||||
// If there's a QObject waiting for audio to be rendered, wake it now
|
||||
QObject* audio_wake_object = GetAudioWakeObject();
|
||||
if (audio_wake_object != nullptr) {
|
||||
QMetaObject::invokeMethod(audio_wake_object, "play_wake", Qt::QueuedConnection);
|
||||
}
|
||||
WakeAudioWakeObject();
|
||||
}
|
||||
|
||||
bool Cacher::IsReversed()
|
||||
|
||||
@@ -630,8 +630,8 @@ GLuint olive::rendering::compose_sequence(ComposeSequenceParams ¶ms) {
|
||||
}
|
||||
}
|
||||
|
||||
if (audio_track_count == 0 && params.viewer != nullptr) {
|
||||
params.viewer->play_wake();
|
||||
if (audio_track_count == 0) {
|
||||
WakeAudioWakeObject();
|
||||
}
|
||||
|
||||
if (params.video) {
|
||||
|
||||
@@ -67,9 +67,9 @@ TimelineHeader::TimelineHeader(QWidget *parent) :
|
||||
in_visible(0),
|
||||
fm(font()),
|
||||
dragging_markers(false),
|
||||
scroll(0)
|
||||
scroll(0),
|
||||
height_actual(fm.height())
|
||||
{
|
||||
height_actual = fm.height();
|
||||
setCursor(Qt::ArrowCursor);
|
||||
setMouseTracking(true);
|
||||
setFocusPolicy(Qt::ClickFocus);
|
||||
|
||||
Reference in New Issue
Block a user