void Image::startDrag(EditData& data) { ImageEditData* ed = new ImageEditData(); ed->e = this; ed->size = _size; data.addData(ed); }
void TextBase::startEdit(EditData& ed) { ed.grips = 0; TextEditData* ted = new TextEditData(this); ted->e = this; ted->cursor.setRow(0); ted->cursor.setColumn(0); ted->cursor.clearSelection(); Q_ASSERT(!score()->undoStack()->active()); // make sure we are not in a Cmd ted->oldXmlText = xmlText(); ted->startUndoIdx = score()->undoStack()->getCurIdx(); if (layoutInvalid) layout(); if (!ted->cursor.set(ed.startMove)) ted->cursor.init(); qreal _spatium = spatium(); // refresh edit bounding box score()->addRefresh(canvasBoundingRect().adjusted(-_spatium, -_spatium, _spatium, _spatium)); ed.addData(ted); }