Commit 5359d970 authored by Jan Möbius's avatar Jan Möbius

Use last texture dir when changing textures

git-svn-id: 383ad7c9-94d9-4d36-a494-682f7c89f535
parent c69d44a1
...@@ -214,10 +214,12 @@ void texturePropertiesWidget::textureChanged(QTreeWidgetItem* _item, int _column ...@@ -214,10 +214,12 @@ void texturePropertiesWidget::textureChanged(QTreeWidgetItem* _item, int _column
void texturePropertiesWidget::slotChangeImage() { void texturePropertiesWidget::slotChangeImage() {
QString fileName = QFileDialog::getOpenFileName(this, tr("Open Image"), QString fileName = QFileDialog::getOpenFileName(this, tr("Open Image"),
OpenFlipper::Options::currentDirStr(), OpenFlipper::Options::currentTextureDirStr(),
tr("Images (*.png *.xpm *.jpg)")); tr("Images (*.png *.xpm *.jpg)"));
if ( QFile(fileName).exists() ){ if ( QFile(fileName).exists() ){
QFileInfo fileInfo(fileName);
OpenFlipper::Options::currentTextureDir( fileInfo.absolutePath() );
imageLabel->setPixmap( QPixmap(fileName) ); imageLabel->setPixmap( QPixmap(fileName) );
imageLabel->setScaledContents(true); imageLabel->setScaledContents(true);
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