images path now relative
This commit is contained in:
@@ -955,11 +955,18 @@ void MainWindow::on_pbImgAdd_clicked()
|
||||
{
|
||||
int id = adloader->animations.values().at(ui->lvAnimations->currentIndex().row()).id;
|
||||
QFileDialog fd;
|
||||
QStringList strl;
|
||||
fd.setNameFilter(tr("Images (*.png)"));
|
||||
fd.setFileMode(QFileDialog::ExistingFiles);
|
||||
QDir dir;
|
||||
if (fd.exec())
|
||||
{
|
||||
adloader->animations[id].pathes.append(fd.selectedFiles());
|
||||
strl = fd.selectedFiles();
|
||||
for (int i=0; i<strl.size(); ++i)
|
||||
{
|
||||
strl[i] = dir.relativeFilePath(strl[i]);
|
||||
}
|
||||
adloader->animations[id].pathes.append(strl);
|
||||
refresh_lwImages(adloader->animations.value(id).pathes);
|
||||
isSaved = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user