Save/restore file paths as relative to project file.
This commit is contained in:
+2
-6
@@ -111,8 +111,6 @@ namespace glabels
|
||||
model::Model *model = model::XmlLabelParser::readFile( fileName );
|
||||
if ( model )
|
||||
{
|
||||
model->setFileName( fileName );
|
||||
|
||||
// Either apply to current window or open a new one
|
||||
if ( window->isEmpty() )
|
||||
{
|
||||
@@ -156,7 +154,6 @@ namespace glabels
|
||||
}
|
||||
|
||||
model::XmlLabelCreator::writeFile( window->model(), window->model()->fileName() );
|
||||
window->model()->clearModified();
|
||||
|
||||
// Save CWD
|
||||
mCwd = QFileInfo( window->model()->fileName() ).absolutePath();
|
||||
@@ -170,7 +167,8 @@ namespace glabels
|
||||
///
|
||||
bool File::saveAs( MainWindow *window )
|
||||
{
|
||||
// Either use the saved CWD from a previous open/save or grab it from the path of the current file
|
||||
// Either use the saved CWD from a previous open/save or grab it from the path
|
||||
// of the current file.
|
||||
QString cwd = mCwd;
|
||||
if ( window->model() && !window->model()->fileName().isEmpty() )
|
||||
{
|
||||
@@ -210,8 +208,6 @@ namespace glabels
|
||||
}
|
||||
|
||||
model::XmlLabelCreator::writeFile( window->model(), fileName );
|
||||
window->model()->setFileName( fileName );
|
||||
window->model()->clearModified();
|
||||
|
||||
// Save CWD
|
||||
mCwd = QFileInfo( fileName ).absolutePath();
|
||||
|
||||
Reference in New Issue
Block a user