aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/PackProfile.cpp
diff options
context:
space:
mode:
authorRedsonBr140 <redson@riseup.net>2022-11-14 21:09:37 -0300
committerGitHub <noreply@github.com>2022-11-14 21:09:37 -0300
commit1e4ee02cbc0f44f390b33b5b85418f4eadffbae4 (patch)
tree6191253cc260c8ee6a5030d4b73f3cbed642d973 /launcher/minecraft/PackProfile.cpp
parentbe765f8d883697d2284343f9ee6c858987622857 (diff)
parentcedc7754d96e4c53d50bcce2b2a0f139b840f3d0 (diff)
downloadPrismLauncher-1e4ee02cbc0f44f390b33b5b85418f4eadffbae4.tar.gz
PrismLauncher-1e4ee02cbc0f44f390b33b5b85418f4eadffbae4.tar.bz2
PrismLauncher-1e4ee02cbc0f44f390b33b5b85418f4eadffbae4.zip
Merge branch 'PrismLauncher:develop' into menu-themes
Diffstat (limited to 'launcher/minecraft/PackProfile.cpp')
-rw-r--r--launcher/minecraft/PackProfile.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/launcher/minecraft/PackProfile.cpp b/launcher/minecraft/PackProfile.cpp
index 1618458f..6ce525eb 100644
--- a/launcher/minecraft/PackProfile.cpp
+++ b/launcher/minecraft/PackProfile.cpp
@@ -613,7 +613,7 @@ QVariant PackProfile::data(const QModelIndex &index, int role) const
bool PackProfile::setData(const QModelIndex& index, const QVariant& value, int role)
{
- if (!index.isValid() || index.row() < 0 || index.row() >= rowCount(index))
+ if (!index.isValid() || index.row() < 0 || index.row() >= rowCount(index.parent()))
{
return false;
}
@@ -675,12 +675,12 @@ Qt::ItemFlags PackProfile::flags(const QModelIndex &index) const
int PackProfile::rowCount(const QModelIndex &parent) const
{
- return d->components.size();
+ return parent.isValid() ? 0 : d->components.size();
}
int PackProfile::columnCount(const QModelIndex &parent) const
{
- return NUM_COLUMNS;
+ return parent.isValid() ? 0 : NUM_COLUMNS;
}
void PackProfile::move(const int index, const MoveDirection direction)