diff --git a/code/studio/src/plugins/tile_editor/land_edit_dialog.cpp b/code/studio/src/plugins/tile_editor/land_edit_dialog.cpp index f7f5c5ce6..87c66aa9c 100644 --- a/code/studio/src/plugins/tile_editor/land_edit_dialog.cpp +++ b/code/studio/src/plugins/tile_editor/land_edit_dialog.cpp @@ -20,6 +20,17 @@ void LandEditDialog::getSelectedTileSets( QStringList &l ) const } } +void LandEditDialog::setSelectedTileSets( QStringList &l ) +{ + tilesetLV->clear(); + + QStringListIterator itr( l ); + while( itr.hasNext() ) + { + tilesetLV->addItem( itr.next() ); + } +} + void LandEditDialog::setTileSets( const QStringList &l ) { tilesetCB->clear(); diff --git a/code/studio/src/plugins/tile_editor/land_edit_dialog.h b/code/studio/src/plugins/tile_editor/land_edit_dialog.h index 9b86a2d06..1ada1c23e 100644 --- a/code/studio/src/plugins/tile_editor/land_edit_dialog.h +++ b/code/studio/src/plugins/tile_editor/land_edit_dialog.h @@ -13,6 +13,8 @@ public: ~LandEditDialog(); void getSelectedTileSets( QStringList &l ) const; + void setSelectedTileSets( QStringList &l ); + void setTileSets( const QStringList &l ); private: diff --git a/code/studio/src/plugins/tile_editor/tile_editor_main_window.cpp b/code/studio/src/plugins/tile_editor/tile_editor_main_window.cpp index a8219f6eb..1e43fa003 100644 --- a/code/studio/src/plugins/tile_editor/tile_editor_main_window.cpp +++ b/code/studio/src/plugins/tile_editor/tile_editor_main_window.cpp @@ -483,6 +483,7 @@ void TileEditorMainWindow::onLandEdit() Land &l = m_lands[ r ]; LandEditDialog d; + d.setSelectedTileSets( l.tilesets ); d.setTileSets( ts ); int result = d.exec();