Skip to content
Snippets Groups Projects
Commit 67e6d584 authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

expand declarations

parent 339a1fe9
No related branches found
No related tags found
1 merge request!1339GUI: fix masks and projections
......@@ -147,7 +147,8 @@ void MaskEditorActions::changeMaskStackingOrder(MaskEditorFlags::Stacking value)
if (value == MaskEditorFlags::SEND_TO_BACK) {
QModelIndexList indexes = m_selectionModel->selectedIndexes();
for (const QModelIndex& itemIndex : indexes) {
int row = itemIndex.row(), new_row = row + 1;
int row = itemIndex.row();
int new_row = row + 1;
if (new_row >= 0 && new_row < m_maskContainerModel->rowCount({})) {
// Here we lower element from 'new_row' instead of rising element from 'row'
// The result should be the same, but rising doesn't work for an unknown reason
......@@ -158,7 +159,8 @@ void MaskEditorActions::changeMaskStackingOrder(MaskEditorFlags::Stacking value)
if (value == MaskEditorFlags::BRING_TO_FRONT) {
QModelIndexList indexes = m_selectionModel->selectedIndexes();
for (const QModelIndex& itemIndex : indexes) {
int row = itemIndex.row(), new_row = row - 1;
int row = itemIndex.row();
int new_row = row - 1;
if (new_row >= 0 && new_row < m_maskContainerModel->rowCount({}))
m_maskContainerModel->moveMask(row, new_row);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment