Save/restore file paths as relative to project file.

This commit is contained in:
Jim Evins
2019-08-18 21:56:37 -04:00
parent ec3d900e87
commit 6a789c9632
11 changed files with 312 additions and 132 deletions
+3 -3
View File
@@ -63,7 +63,7 @@ namespace glabels
mUndoRedoModel = undoRedoModel;
// Initialize CWD
mCwd = mModel->dir();
mCwd = mModel->dirPath();
onMergeChanged();
connect( mModel, SIGNAL(mergeChanged()), this, SLOT(onMergeChanged()) );
@@ -93,7 +93,7 @@ namespace glabels
case merge::Factory::FILE:
locationLabel->setEnabled( true );
fn = QDir(mModel->dir()).relativeFilePath( mModel->merge()->source() );
fn = mModel->dir().relativeFilePath( mModel->merge()->source() );
locationLineEdit->setText( fn );
locationBrowseButton->setVisible( true );
break;
@@ -124,7 +124,7 @@ namespace glabels
///
void MergeView::onMergeSourceChanged()
{
QString fn = QDir(mModel->dir()).relativeFilePath( mModel->merge()->source() );
QString fn = mModel->dir().relativeFilePath( mModel->merge()->source() );
locationLineEdit->setText( fn );
recordsTable->clear();