Fixed PakTool dialog not having a parent assigned, fixed a crash when attempting to clone SCGN objects

This commit is contained in:
parax0 2016-03-22 01:29:17 -06:00
parent c6e932e14b
commit 843ea96ceb
3 changed files with 6 additions and 3 deletions

View File

@ -107,6 +107,9 @@ public:
return iLyr; return iLyr;
} }
if (mpArea->GetGeneratorLayer() == this)
return mpArea->GetScriptLayerCount();
return -1; return -1;
} }

View File

@ -224,10 +224,10 @@ void CStartWindow::on_actionExtract_PAK_triggered()
if (!Pak.isEmpty()) if (!Pak.isEmpty())
{ {
CPakToolDialog::EResult Result = CPakToolDialog::Extract(Pak); CPakToolDialog::EResult Result = CPakToolDialog::Extract(Pak, 0, this);
if (Result == CPakToolDialog::eSuccess) if (Result == CPakToolDialog::eSuccess)
Result = CPakToolDialog::DumpList(Pak); Result = CPakToolDialog::DumpList(Pak, 0, this);
if (Result == CPakToolDialog::eSuccess) if (Result == CPakToolDialog::eSuccess)
QMessageBox::information(this, "Success", "Extracted pak successfully!"); QMessageBox::information(this, "Success", "Extracted pak successfully!");

View File

@ -371,7 +371,7 @@ bool CWorldEditor::SaveAndRepack()
} }
QString PakOut; QString PakOut;
CPakToolDialog::EResult Result = CPakToolDialog::Repack(CurrentGame(), mPakTarget, mPakFileList, mWorldDir, &PakOut); CPakToolDialog::EResult Result = CPakToolDialog::Repack(CurrentGame(), mPakTarget, mPakFileList, mWorldDir, &PakOut, this);
if (Result == CPakToolDialog::eError) if (Result == CPakToolDialog::eError)
QMessageBox::warning(this, "Error", "Failed to repack!"); QMessageBox::warning(this, "Error", "Failed to repack!");