Commit da005d91 authored by Jan Möbius's avatar Jan Möbius

Use OpenFlipper Settings for getting current Dir



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11166 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 7526604b
......@@ -150,8 +150,8 @@ void Core::saveSettings(){
}
// Get the chosen directory and remember it.
QString newpath = complete_name.section(OpenFlipper::Options::dirSeparator(),0,-2);
OpenFlipperSettings().setValue("Core/CurrentDir", newpath);
QFileInfo fileInfo(complete_name);
OpenFlipperSettings().setValue("Core/CurrentDir", fileInfo.absolutePath() );
// ========================================================================================
// update status information
......@@ -185,7 +185,7 @@ void Core::saveSettings(){
if ( saveAllBox->isChecked() )
{
// Use path of settings file for all objects
filename = newpath + OpenFlipper::Options::dirSeparator() + o_it->name();
filename = fileInfo.absolutePath() + OpenFlipper::Options::dirSeparator() + o_it->name();
}
else
{
......@@ -194,8 +194,8 @@ void Core::saveSettings(){
// handle the case that the object was created in current session and not loaded from disk
if (o_it->path() == ".") {
filename = newpath + OpenFlipper::Options::dirSeparator() + o_it->name();
std::cerr << "newpath : " << newpath.toStdString() << std::endl;
filename = fileInfo.absolutePath() + OpenFlipper::Options::dirSeparator() + o_it->name();
std::cerr << "newpath : " << fileInfo.absolutePath().toStdString() << std::endl;
std::cerr << "name : " << o_it->name().toStdString() << std::endl;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment