Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 23268 → Rev 23269

/trunk/Scribus/scribus/selection.cpp
109,7 → 109,7
(*it)->setSelected(false);
}
m_SelList = other.m_SelList;
if (m_isGUISelection && !m_SelList.isEmpty())
if (m_isGUISelection)
m_sigSelectionChanged = true;
if (emptyOther)
other.clear();
145,28 → 145,26
 
bool Selection::connectItemToGUI()
{
bool ret = false;
if (!m_isGUISelection || m_SelList.isEmpty())
return ret;
if (m_SelList.count() == 1)
{
return false;
 
QPointer<PageItem> pi = m_SelList.first();
//Quick check to see if the pointer is nullptr, if its nullptr, we should remove it from the list now
if (pi.isNull())
while (pi.isNull())
{
m_SelList.removeAll(pi);
return ret;
if (m_SelList.isEmpty())
break;
pi = m_SelList.first();
}
ret = pi->connectToGUI();
 
if (pi.isNull())
return false;
 
bool ret = pi->connectToGUI();
pi->emitAllToGUI();
m_sigSelectionChanged = true;
}
else
{
ret = m_SelList.first()->connectToGUI();
m_SelList.first()->emitAllToGUI();
m_sigSelectionChanged = true;
}
 
sendSignals(false);
return ret;
}
230,16 → 228,17
return true;
}
 
bool Selection::prependItem(PageItem *item, bool /*doEmit*/)
bool Selection::prependItem(PageItem *item)
{
if (item == nullptr)
return false;
if (!m_SelList.contains(item))
{
if (m_SelList.contains(item))
return false;
 
if (m_isGUISelection && !m_SelList.isEmpty())
m_SelList[0]->disconnectFromGUI();
m_SelList.prepend(item);
if (m_isGUISelection /*&& doEmit*/)
if (m_isGUISelection)
{
item->setSelected(true);
m_sigSelectionChanged = true;
247,8 → 246,6
sendSignals();
return true;
}
return false;
}
 
PageItem *Selection::itemAt_(int index)
{
/trunk/Scribus/scribus/selection.h
92,7 → 92,7
* @param doEmit call emitAllToGUI()
* @return If the item was added
*/
bool prependItem(PageItem *item, bool doEmit=true);
bool prependItem(PageItem *item);
 
bool containsItem(PageItem *item) const { return m_SelList.contains(item); }