Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 16812 → Rev 16814

/trunk/Scribus/scribus/canvasmode_create.cpp
392,9 → 392,18
 
m_createTransaction = new UndoTransaction(Um::instance()->beginTransaction("creating"));
currItem = doCreateNewObject();
if (m_createTransaction && currItem)
if (m_createTransaction && currItem && currItem->isGroup())
{
// 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)
758,7 → 767,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))
785,7 → 793,7
offY = 0.0;
m_doc->m_Selection->clear();
if (UndoManager::undoEnabled())
activeTransaction = new UndoTransaction(m_view->undoManager->beginTransaction(m_doc->currentPage()->getUName(),
activeTransaction = new UndoTransaction(Um::instance()->beginTransaction(m_doc->currentPage()->getUName(),
Um::ITable, Um::CreateTable,
QString(Um::RowsCols).arg(Rows).arg(Cols),
Um::ICreate));
828,6 → 836,7
}
}
m_doc->itemSelection_GroupObjects(false, false);
z = m_doc->Items->count() - 1;
if (activeTransaction)
{
activeTransaction->commit();
/trunk/Scribus/scribus/scribusdoc.cpp
12472,7 → 12472,6
double gy = miny;
double gw = maxx - minx;
double gh = maxy - miny;
bool wasUndo = UndoManager::undoEnabled();
undoManager->setUndoEnabled(false);
int z = itemAdd(PageItem::Group, PageItem::Rectangle, gx, gy, gw, gh, 0, CommonStrings::None, CommonStrings::None, true);
PageItem *groupItem = Items->takeAt(z);
12482,7 → 12481,7
groupItem->groupWidth = gw;
groupItem->groupHeight = gh;
groupItem->LayerID = objectsLayer;
undoManager->setUndoEnabled(wasUndo);
undoManager->setUndoEnabled(true);
for (uint c = 0; c < selectedItemCount; ++c)
{
currItem = itemSelection->itemAt(c);
12493,14 → 12492,15
groupItem->asGroupFrame()->adjustXYPosition();
itemSelection->clear();
itemSelection->addItem(groupItem);
selectedItemCount = itemSelection->count();
selectedItemCount = groupItem->groupItemList.count();
SimpleState *ss = new SimpleState(Um::Group, tooltip);
ss->set("GROUP", "group");
ss->set("itemcount", selectedItemCount);
for (uint a=0; a<selectedItemCount; ++a)
ss->set("itemcount", selectedItemCount + 1);
ss->set(QString("item%1").arg(0), groupItem->uniqueNr);
for (uint a = 0; a < groupItem->groupItemList.count(); ++a)
{
currItem = itemSelection->itemAt(a);
ss->set(QString("item%1").arg(a), currItem->uniqueNr);
currItem = groupItem->groupItemList.at(a);
ss->set(QString("item%1").arg(a + 1), currItem->uniqueNr);
}
GroupCounter++;
regionsChanged()->update(QRectF(gx-5, gy-5, gw+10, gh+10));
/trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
298,10 → 298,7
break;
}
}
if (currItem)
{
setCurrentItem(currItem);
}
updateGeometry();
repaint();
}
325,12 → 322,14
//if (m_item == i)
// return;
 
if (!m_doc)
if (item && !m_doc)
setDoc(item->doc());
 
m_haveItem = false;
m_item = item;
 
if (!m_item) return;
 
if (m_item->FrameType == 0)
customShape->setIcon(customShape->getIconPixmap(0));
if (m_item->FrameType == 1)