mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-19 23:25:09 -05:00
Update map view when tilesets change
This commit is contained in:
@@ -34,6 +34,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
connect(editor, SIGNAL(objectsChanged()), this, SLOT(updateSelectedObjects()));
|
||||
connect(editor, SIGNAL(selectedObjectsChanged()), this, SLOT(updateSelectedObjects()));
|
||||
connect(editor, SIGNAL(loadMapRequested(QString, QString)), this, SLOT(onLoadMapRequested(QString, QString)));
|
||||
connect(editor, SIGNAL(tilesetChanged(QString)), this, SLOT(onTilesetChanged(QString)));
|
||||
|
||||
on_toolButton_Paint_clicked();
|
||||
|
||||
@@ -206,6 +207,8 @@ void MainWindow::displayMapProperties() {
|
||||
ui->comboBox_Weather->clear();
|
||||
ui->comboBox_Type->clear();
|
||||
ui->comboBox_BattleScene->clear();
|
||||
ui->comboBox_PrimaryTileset->clear();
|
||||
ui->comboBox_SecondaryTileset->clear();
|
||||
ui->checkBox_ShowLocation->setChecked(false);
|
||||
if (!editor || !editor->map || !editor->project) {
|
||||
ui->frame_3->setEnabled(false);
|
||||
@@ -418,6 +421,11 @@ void MainWindow::onAddNewMapToGroupClick(QAction* triggeredAction)
|
||||
setMap(newMapName);
|
||||
}
|
||||
|
||||
void MainWindow::onTilesetChanged(QString mapName)
|
||||
{
|
||||
setMap(mapName);
|
||||
}
|
||||
|
||||
void MainWindow::on_mapList_activated(const QModelIndex &index)
|
||||
{
|
||||
QVariant data = index.data(Qt::UserRole);
|
||||
@@ -820,3 +828,13 @@ void MainWindow::on_comboBox_EmergeMap_currentTextChanged(const QString &mapName
|
||||
{
|
||||
editor->updateEmergeMap(mapName);
|
||||
}
|
||||
|
||||
void MainWindow::on_comboBox_PrimaryTileset_activated(const QString &tilesetLabel)
|
||||
{
|
||||
editor->updatePrimaryTileset(tilesetLabel);
|
||||
}
|
||||
|
||||
void MainWindow::on_comboBox_SecondaryTileset_activated(const QString &tilesetLabel)
|
||||
{
|
||||
editor->updateSecondaryTileset(tilesetLabel);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user