fix instance IDs and resource pack imports
Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
This commit is contained in:
parent
a33b804923
commit
1f6b8f9d2b
@ -152,7 +152,7 @@ bool LocalResourcePackParseTask::abort()
|
||||
|
||||
void LocalResourcePackParseTask::executeTask()
|
||||
{
|
||||
Q_ASSERT(m_resource_pack.valid());
|
||||
// Q_ASSERT(m_resource_pack.valid());
|
||||
|
||||
if (!ResourcePackUtils::process(m_resource_pack))
|
||||
return;
|
||||
|
@ -143,7 +143,7 @@ bool LocalTexturePackParseTask::abort()
|
||||
|
||||
void LocalTexturePackParseTask::executeTask()
|
||||
{
|
||||
Q_ASSERT(m_texture_pack.valid());
|
||||
// Q_ASSERT(m_texture_pack.valid());
|
||||
|
||||
if (!TexturePackUtils::process(m_texture_pack))
|
||||
return;
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "Application.h"
|
||||
#include "InstanceList.h"
|
||||
|
||||
#include <InstanceList.h>
|
||||
#include "ui/instanceview/InstanceDelegate.h"
|
||||
|
||||
ImportResourcePackDialog::ImportResourcePackDialog(QWidget* parent) : QDialog(parent), ui(new Ui::ImportResourcePackDialog)
|
||||
@ -40,7 +41,7 @@ ImportResourcePackDialog::ImportResourcePackDialog(QWidget* parent) : QDialog(pa
|
||||
|
||||
void ImportResourcePackDialog::activated(QModelIndex index)
|
||||
{
|
||||
selectedInstanceKey = index.data(Qt::UserRole).toString();
|
||||
selectedInstanceKey = index.data(InstanceList::InstanceIDRole).toString();
|
||||
accept();
|
||||
}
|
||||
|
||||
@ -49,7 +50,7 @@ void ImportResourcePackDialog::selectionChanged(QItemSelection selected, QItemSe
|
||||
if (selected.empty())
|
||||
return;
|
||||
|
||||
QString key = selected.first().indexes().first().data(Qt::UserRole).toString();
|
||||
QString key = selected.first().indexes().first().data(InstanceList::InstanceIDRole).toString();
|
||||
if (!key.isEmpty()) {
|
||||
selectedInstanceKey = key;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user