mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-03-06 14:27:43 +00:00
Hiding "Delete" button for folders
This commit is contained in:
parent
77e09864d9
commit
ebab4844be
|
@ -74,10 +74,22 @@ void GuiGamelistOptions::openMetaDataEd()
|
|||
ScraperSearchParams p;
|
||||
p.game = file;
|
||||
p.system = file->getSystem();
|
||||
mWindow->pushGui(new GuiMetaDataEd(mWindow, &file->metadata, file->metadata.getMDD(), p, file->getPath().filename().string(),
|
||||
std::bind(&IGameListView::onFileChanged, getGamelist(), file, FILE_METADATA_CHANGED), [this, file] {
|
||||
|
||||
std::function<void()> deleteBtnFunc;
|
||||
|
||||
if (file->getType() == FOLDER)
|
||||
{
|
||||
deleteBtnFunc = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
deleteBtnFunc = [this, file] {
|
||||
getGamelist()->remove(file);
|
||||
}));
|
||||
};
|
||||
}
|
||||
|
||||
mWindow->pushGui(new GuiMetaDataEd(mWindow, &file->metadata, file->metadata.getMDD(), p, file->getPath().filename().string(),
|
||||
std::bind(&IGameListView::onFileChanged, getGamelist(), file, FILE_METADATA_CHANGED), deleteBtnFunc));
|
||||
}
|
||||
|
||||
void GuiGamelistOptions::jumpToLetter()
|
||||
|
|
Loading…
Reference in a new issue