Moved edit mode buttons onto a toolbar, fixed a couple bugs

This commit is contained in:
Aruki
2017-02-12 14:19:51 -07:00
parent 4d87ef0312
commit 009c42f281
9 changed files with 93 additions and 152 deletions

View File

@@ -15,6 +15,7 @@ WCreateTab::WCreateTab(CWorldEditor *pEditor, QWidget *pParent /*= 0*/)
mpEditor->Viewport()->installEventFilter(this);
connect(mpEditor, SIGNAL(LayersModified()), this, SLOT(OnLayersChanged()));
connect(gpEdApp, SIGNAL(ActiveProjectChanged(CGameProject*)), this, SLOT(OnActiveProjectChanged(CGameProject*)));
connect(ui->SpawnLayerComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(OnSpawnLayerChanged(int)));
}
@@ -57,9 +58,9 @@ bool WCreateTab::eventFilter(QObject *pObj, QEvent *pEvent)
}
// ************ PUBLIC SLOTS ************
void WCreateTab::OnMapChanged()
void WCreateTab::OnActiveProjectChanged(CGameProject *pProj)
{
EGame Game = mpEditor->CurrentGame();
EGame Game = (pProj ? pProj->Game() : eUnknownGame);
CMasterTemplate *pMaster = CMasterTemplate::MasterForGame(Game);
ui->TemplateView->SetMaster(pMaster);
}