Paste P253

Masterwork From Distant Lands
ActivePublic

Authored by dkazakov on Aug 20 2018, 11:58 AM.
diff --git a/libs/widgets/KisPaletteModel.cpp b/libs/widgets/KisPaletteModel.cpp
index 16d8da9..76d2a60 100644
--- a/libs/widgets/KisPaletteModel.cpp
+++ b/libs/widgets/KisPaletteModel.cpp
@@ -131,7 +131,9 @@ int KisPaletteModel::rowNumberInGroup(int rowInModel) const
if (m_groupNameRows.contains(rowInModel)) {
return -1;
}
- for (auto it = m_groupNameRows.keys().rbegin(); it != m_groupNameRows.keys().rend(); it++) {
+
+ auto keys = m_groupNameRows.keys();
+ for (auto it = keys.rbegin(); it != keys.rend(); it++) {
if (*it < rowInModel) {
return rowInModel - *it - 1;
}
dkazakov edited the content of this paste. (Show Details)Aug 20 2018, 11:58 AM
dkazakov changed the title of this paste from untitled to Masterwork From Distant Lands.