View Revisions: Issue #15976

Summary 0015976: [PATCH] slightly simplify the cursor setting in canvasmode_*.cpp
Revision 2019-11-30 19:47 by ale
Description while working on 0015869 i'm trying to find out how setting the cursor works and i stumbled upon this:

does this loop do anything?

https://gitlab.com/scribus/scribus/blob/master/scribus/canvasmode_drawcalligraphic.cpp#L151

            for (int i = 0; i < m_doc->m_Selection->count(); ++i)
            {
                currItem = m_doc->m_Selection->itemAt(i);
                if (currItem->locked())
                    break;
                setModeCursor();
            }

except setting the same cursor n times?

why does it break on the first locked item?

does the attached patch change anything?
Revision 2019-11-30 19:46 by ale
Description while working on 0015869 i'm trying to find out how setting the cursor works and i stumbled upon this:

does this loop do anything?

            for (int i = 0; i < m_doc->m_Selection->count(); ++i)
            {
                currItem = m_doc->m_Selection->itemAt(i);
                if (currItem->locked())
                    break;
                setModeCursor();
            }

except setting the same cursor n times?

why does it break on the first locked item?

does the attached patch change anything?