mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-05 15:30:00 +01:00
BugFix Avoid reload media player on undo/redo
This commit is contained in:
@@ -1145,6 +1145,7 @@ void SessionLoader::visit (Source& s)
|
||||
|
||||
void SessionLoader::visit (MediaSource& s)
|
||||
{
|
||||
bool freshload = false;
|
||||
// set uri
|
||||
XMLElement* pathNode = xmlCurrent_->FirstChildElement("uri"); // TODO change to "path" but keep backward compatibility
|
||||
if (pathNode) {
|
||||
@@ -1162,6 +1163,7 @@ void SessionLoader::visit (MediaSource& s)
|
||||
}
|
||||
}
|
||||
s.setPath(path);
|
||||
freshload = true;
|
||||
}
|
||||
}
|
||||
// ensures the source is initialized even if no valid path is given
|
||||
@@ -1178,7 +1180,8 @@ void SessionLoader::visit (MediaSource& s)
|
||||
s.mediaplayer()->setRate(1.0);
|
||||
// add a callback to activate source play speed and rewind
|
||||
s.call( new PlaySpeed( r ) );
|
||||
s.call( new RePlay( ) );
|
||||
if (freshload)
|
||||
s.call( new RePlay( ) );
|
||||
}
|
||||
|
||||
void SessionLoader::visit (SessionFileSource& s)
|
||||
|
||||
@@ -471,7 +471,8 @@ void SourceControlWindow::Render()
|
||||
mediaplayer_active_->timeline()->clearFading();
|
||||
mediaplayer_active_->timeline()->clearGaps();
|
||||
mediaplayer_active_->timeline()->clearFlags();
|
||||
mediaplayer_active_->setVideoEffect("");
|
||||
if (!mediaplayer_active_->videoEffect().empty() && mediaplayer_active_->videoEffectAvailable())
|
||||
mediaplayer_active_->setVideoEffect("");
|
||||
std::ostringstream oss;
|
||||
oss << SystemToolkit::base_filename( mediaplayer_active_->filename() );
|
||||
oss << ": Reset timeline";
|
||||
|
||||
Reference in New Issue
Block a user