Save the last directoy where we loaded a tilebank from.

This commit is contained in:
dfighter1985 2014-08-05 15:16:25 +02:00
parent 2fe02e3925
commit c3984abbb4
2 changed files with 5 additions and 1 deletions

View file

@ -264,7 +264,7 @@ void TileEditorMainWindow::open()
{
QString fn = QFileDialog::getOpenFileName( this,
tr( "Loading tilebank" ),
"",
m_lastOpenDir,
tr( "tilebank files (*.tilebank)" ) );
if( fn.isEmpty() )
@ -284,6 +284,9 @@ void TileEditorMainWindow::open()
onTileBankLoaded();
m_fileName = fn;
int idx = fn.lastIndexOf( '/' );
m_lastOpenDir = fn.left( idx );
}
void TileEditorMainWindow::onZoomFactor(int level)

View file

@ -122,6 +122,7 @@ private:
};
QString m_fileName;
QString m_lastOpenDir;
};
#endif // TILE_EDITOR_MAIN_WINDOW_H