Fixed a couple issues with the resource browser and fixed an error in the 32-bit name map
This commit is contained in:
parent
18482cbae6
commit
95d0279027
|
@ -59644,7 +59644,7 @@
|
|||
<Asset>
|
||||
<Key>4026B776</Key>
|
||||
<Value>
|
||||
<Name>06_under_intro_save</Name>
|
||||
<Name>06_under_intro_save_0</Name>
|
||||
<Directory>Strings/Worlds/OverWorld/</Directory>
|
||||
<Type>STRG</Type>
|
||||
<AutoGenName>true</AutoGenName>
|
||||
|
|
|
@ -45,6 +45,11 @@ CExportGameDialog::CExportGameDialog(const QString& rkIsoPath, const QString& rk
|
|||
TString IsoName = TO_TSTRING(rkIsoPath).GetFileName();
|
||||
setWindowTitle(QString("Export Settings - %1").arg( TO_QSTRING(IsoName) ));
|
||||
}
|
||||
else
|
||||
{
|
||||
delete mpDisc;
|
||||
mpDisc = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
CExportGameDialog::~CExportGameDialog()
|
||||
|
|
|
@ -40,8 +40,12 @@ CResourceBrowser::CResourceBrowser(QWidget *pParent)
|
|||
mpRedoAction = new QAction("Redo", this);
|
||||
mpUndoAction->setShortcut( QKeySequence::Undo );
|
||||
mpRedoAction->setShortcut( QKeySequence::Redo );
|
||||
|
||||
// todo - undo/redo commands are deactivated because they conflict with the World Editor undo/redo commands. fix this
|
||||
#if 0
|
||||
addAction(mpUndoAction);
|
||||
addAction(mpRedoAction);
|
||||
#endif
|
||||
|
||||
connect(mpUndoAction, SIGNAL(triggered(bool)), this, SLOT(Undo()));
|
||||
connect(mpRedoAction, SIGNAL(triggered(bool)), this, SLOT(Redo()));
|
||||
|
|
|
@ -25,17 +25,18 @@ CResourceTableContextMenu::CResourceTableContextMenu(CResourceBrowser *pBrowser,
|
|||
#endif
|
||||
|
||||
mpOpenAction = addAction("Open", this, SLOT(Open()));
|
||||
mpOpenInExternalAppAction = addAction("Open in external application", this, SLOT(OpenInExternalApp()));
|
||||
mpOpenInExternalAppAction = addAction("Open in External Application", this, SLOT(OpenInExternalApp()));
|
||||
mpOpenInExplorerAction = addAction(OpenInExplorerString, this, SLOT(OpenInExplorer()));
|
||||
mpSelectFolderAction = addAction("Select folder", this, SLOT(SelectFolder()));
|
||||
addSeparator();
|
||||
mpRenameAction = addAction("Rename", this, SLOT(Rename()));
|
||||
mpShowReferencersAction = addAction("Show referencers", this, SLOT(ShowReferencers()));
|
||||
mpShowDependenciesAction = addAction("Show dependencies", this, SLOT(ShowDependencies()));
|
||||
mpSelectFolderAction = addAction("Select Folder", this, SLOT(SelectFolder()));
|
||||
mpShowReferencersAction = addAction("Show Referencers", this, SLOT(ShowReferencers()));
|
||||
mpShowDependenciesAction = addAction("Show Dependencies", this, SLOT(ShowDependencies()));
|
||||
mpDeleteAction = addAction("Delete", this, SLOT(Delete()));
|
||||
addSeparator();
|
||||
mpCopyNameAction = addAction("Copy name", this, SLOT(CopyName()));
|
||||
mpCopyPathAction = addAction("Copy path", this, SLOT(CopyPath()));
|
||||
mpCopyIDAction = addAction("Copy asset ID", this, SLOT(CopyID()));
|
||||
mpCopyNameAction = addAction("Copy Name", this, SLOT(CopyName()));
|
||||
mpCopyPathAction = addAction("Copy Path", this, SLOT(CopyPath()));
|
||||
mpCopyIDAction = addAction("Copy Asset ID", this, SLOT(CopyID()));
|
||||
}
|
||||
|
||||
void CResourceTableContextMenu::ShowMenu(const QPoint& rkPos)
|
||||
|
@ -55,6 +56,7 @@ void CResourceTableContextMenu::ShowMenu(const QPoint& rkPos)
|
|||
mpSelectFolderAction->setVisible(mpModel->IsDisplayingAssetList());
|
||||
mpShowDependenciesAction->setVisible(IsRes);
|
||||
mpShowReferencersAction->setVisible(IsRes);
|
||||
mpDeleteAction->setVisible(mpDirectory && mpDirectory->IsEmpty(true));
|
||||
mpCopyIDAction->setVisible(IsRes);
|
||||
|
||||
// Exec menu
|
||||
|
@ -93,6 +95,11 @@ void CResourceTableContextMenu::OpenInExplorer()
|
|||
}
|
||||
}
|
||||
|
||||
void CResourceTableContextMenu::Rename()
|
||||
{
|
||||
mpTable->edit(mProxyIndex);
|
||||
}
|
||||
|
||||
void CResourceTableContextMenu::SelectFolder()
|
||||
{
|
||||
CVirtualDirectory *pDir = (mpEntry ? mpEntry->Directory() : mpDirectory->Parent());
|
||||
|
@ -104,11 +111,6 @@ void CResourceTableContextMenu::SelectFolder()
|
|||
mpBrowser->SelectDirectory(mpDirectory);
|
||||
}
|
||||
|
||||
void CResourceTableContextMenu::Rename()
|
||||
{
|
||||
mpTable->edit(mProxyIndex);
|
||||
}
|
||||
|
||||
void CResourceTableContextMenu::ShowReferencers()
|
||||
{
|
||||
ASSERT(mpEntry);
|
||||
|
@ -154,6 +156,15 @@ void CResourceTableContextMenu::ShowDependencies()
|
|||
mpBrowser->ClearFilters();
|
||||
}
|
||||
|
||||
void CResourceTableContextMenu::Delete()
|
||||
{
|
||||
ASSERT(mpDirectory && mpDirectory->IsEmpty(true));
|
||||
|
||||
QList<CVirtualDirectory*> List;
|
||||
List << mpDirectory;
|
||||
mpBrowser->DeleteDirectories(List);
|
||||
}
|
||||
|
||||
void CResourceTableContextMenu::CopyName()
|
||||
{
|
||||
if (mpEntry)
|
||||
|
|
|
@ -30,6 +30,7 @@ class CResourceTableContextMenu : public QMenu
|
|||
QAction *mpRenameAction;
|
||||
QAction *mpShowReferencersAction;
|
||||
QAction *mpShowDependenciesAction;
|
||||
QAction *mpDeleteAction;
|
||||
|
||||
QAction *mpCopyNameAction;
|
||||
QAction *mpCopyPathAction;
|
||||
|
@ -45,10 +46,11 @@ public slots:
|
|||
void Open();
|
||||
void OpenInExternalApp();
|
||||
void OpenInExplorer();
|
||||
void SelectFolder();
|
||||
void Rename();
|
||||
void SelectFolder();
|
||||
void ShowReferencers();
|
||||
void ShowDependencies();
|
||||
void Delete();
|
||||
void CopyName();
|
||||
void CopyPath();
|
||||
void CopyID();
|
||||
|
|
|
@ -302,12 +302,12 @@ void CResourceTableModel::CheckAddDirectory(CVirtualDirectory *pDir)
|
|||
|
||||
void CResourceTableModel::CheckRemoveDirectory(CVirtualDirectory *pDir)
|
||||
{
|
||||
if (pDir->Parent() != mpCurrentDir)
|
||||
{
|
||||
QModelIndex Index = GetIndexForDirectory(pDir);
|
||||
int Index = mDirectories.indexOf(pDir);
|
||||
|
||||
beginRemoveRows(QModelIndex(), Index.row(), Index.row());
|
||||
mDirectories.removeAt(Index.row());
|
||||
if (Index != -1)
|
||||
{
|
||||
beginRemoveRows(QModelIndex(), Index, Index);
|
||||
mDirectories.removeAt(Index);
|
||||
endRemoveRows();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue