Add the already selected tilesets to the land when editing.

This commit is contained in:
dfighter1985 2014-07-30 07:43:02 +02:00
parent 0582dd4e4f
commit f25200c966
3 changed files with 14 additions and 0 deletions

View file

@ -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();

View file

@ -13,6 +13,8 @@ public:
~LandEditDialog();
void getSelectedTileSets( QStringList &l ) const;
void setSelectedTileSets( QStringList &l );
void setTileSets( const QStringList &l );
private:

View file

@ -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();