mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Fixed Recent file saving order.
This commit is contained in:
@@ -149,7 +149,7 @@ Mixer::Mixer() : session_(nullptr), back_session_(nullptr), current_view_(nullpt
|
||||
// auto load if Settings ask to
|
||||
if ( Settings::application.recentSessions.load_at_start &&
|
||||
Settings::application.recentSessions.filenames.size() > 0 )
|
||||
open( Settings::application.recentSessions.filenames.back() );
|
||||
open( Settings::application.recentSessions.filenames.front() );
|
||||
else
|
||||
// initializes with a new empty session
|
||||
clear();
|
||||
@@ -291,7 +291,10 @@ void Mixer::insertSource(Source *s)
|
||||
// set a default depth to the new source
|
||||
layer_.setDepth(s);
|
||||
|
||||
// update view to show source created
|
||||
current_view_->update(0);
|
||||
// current_view_->makeVisible(s);
|
||||
current_view_->restoreSettings();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ void Settings::Save()
|
||||
XMLElement *fileNode = xmlDoc.NewElement("path");
|
||||
XMLText *text = xmlDoc.NewText( (*it).c_str() );
|
||||
fileNode->InsertEndChild( text );
|
||||
recentsession->InsertEndChild(fileNode);
|
||||
recentsession->InsertFirstChild(fileNode);
|
||||
};
|
||||
recent->InsertEndChild(recentsession);
|
||||
|
||||
@@ -112,11 +112,10 @@ void Settings::Save()
|
||||
recentmedia->SetAttribute("path", application.recentImport.path.c_str());
|
||||
for(auto it = application.recentImport.filenames.begin();
|
||||
it != application.recentImport.filenames.end(); it++) {
|
||||
|
||||
XMLElement *fileNode = xmlDoc.NewElement("path");
|
||||
XMLText *text = xmlDoc.NewText( (*it).c_str() );
|
||||
fileNode->InsertEndChild( text );
|
||||
recentmedia->InsertEndChild(fileNode);
|
||||
recentmedia->InsertFirstChild(fileNode);
|
||||
}
|
||||
recent->InsertEndChild(recentmedia);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user