Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 16812 → Rev 16813

/branches/Version135/Scribus/scribus/canvasmode_create.cpp
374,9 → 374,18
 
m_createTransaction = new UndoTransaction(Um::instance()->beginTransaction("creating"));
currItem = doCreateNewObject();
if (m_createTransaction && currItem)
if (m_createTransaction && currItem && currItem->isGroupControl)
{
// We created a table, just commit transaction
m_view->resetMousePressed();
m_createTransaction->commit();
m_doc->changed();
delete m_createTransaction;
m_createTransaction = NULL;
}
else if (m_createTransaction && currItem)
{
m_view->resetMousePressed();
currItem->checkChanges(true);
QString targetName = Um::ScratchSpace;
if (currItem->OwnPage > -1)
767,7 → 776,6
canvasCurrCoord.setXY(qRound(Tw), qRound(Th));
Tw = Tw - Tx;
Th = Th - Ty;
int z;
int Cols, Rows;
double deltaX, deltaY, offX, offY;
if ((Th < 6) || (Tw < 6))
794,10 → 802,10
offY = 0.0;
m_doc->m_Selection->clear();
if (UndoManager::undoEnabled())
activeTransaction = new UndoTransaction(m_view->undoManager->beginTransaction(m_doc->currentPage()->getUName(),
Um::ITable, Um::CreateTable,
QString(Um::RowsCols).arg(Rows).arg(Cols),
Um::ICreate));
activeTransaction = new UndoTransaction(Um::instance()->beginTransaction(m_doc->currentPage()->getUName(),
Um::ITable, Um::CreateTable,
QString(Um::RowsCols).arg(Rows).arg(Cols),
Um::ICreate));
m_doc->m_Selection->delaySignalsOn();
for (int rc = 0; rc < Rows; ++rc)
{
837,6 → 845,7
}
}
m_doc->itemSelection_GroupObjects(false, false);
z = (m_doc->Items->count() - 1) - Rows * Cols;
if (activeTransaction)
{
activeTransaction->commit();