Skip to content

Commit

Permalink
Fix hidden custom cells being shown incorrectly in some workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrio95 committed Oct 8, 2019
1 parent 6c0bef1 commit 2e7a18c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mscore/palette/paletteworkspace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,10 @@ AbstractPaletteController* PaletteWorkspace::getMainPaletteController()
QModelIndex PaletteWorkspace::customElementsPaletteIndex(const QModelIndex& index)
{
const QAbstractItemModel* model = customElementsPaletteModel();
if (index.model() == mainPalette && index.parent() == QModelIndex())
return model->index(index.row(), 0);
if (index.model() == mainPalette && index.parent() == QModelIndex()) {
const int row = convertProxyIndex(index, userPalette).row();
return model->index(row, 0);
}
return convertIndex(index, model);
}

Expand Down

0 comments on commit 2e7a18c

Please sign in to comment.