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