From 2e7a18cdba81e31633065909d70124fff68b96eb Mon Sep 17 00:00:00 2001 From: Dmitri Ovodok Date: Tue, 8 Oct 2019 13:34:58 +0200 Subject: [PATCH] Fix hidden custom cells being shown incorrectly in some workspaces --- mscore/palette/paletteworkspace.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mscore/palette/paletteworkspace.cpp b/mscore/palette/paletteworkspace.cpp index b1936f25e6a5e..faecf330981e3 100644 --- a/mscore/palette/paletteworkspace.cpp +++ b/mscore/palette/paletteworkspace.cpp @@ -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); }