void DrawImportCmd::Execute () { GraphicComp* comps = PostDialog(); Clipboard* cb; if (comps != nil) { DrawImportPasteCmd* paste_cmd = new DrawImportPasteCmd(GetEditor(), new Clipboard(comps)); paste_cmd->Execute(); paste_cmd->Log(); if(!comps->IsA(FRAME_IDRAW_COMP) && !comps->IsA(DRAW_IDRAW_COMP)) { if (chooser_->centered()) GetEditor()->GetViewer()->Align(comps, /* Center */ 4); if (!chooser_->by_pathname()) { FrameUngroupCmd* ungroup_cmd = new FrameUngroupCmd(GetEditor()); ungroup_cmd->Execute(); MacroCmd* macro_cmd = new MacroCmd(GetEditor(), paste_cmd, ungroup_cmd); macro_cmd->Log(); } else { paste_cmd->Log(); } } else delete comps; } }
void ImportCmd::Execute () { GraphicComp* comp = PostDialog(); if (comp != nil) { PasteCmd* paste_cmd = new PasteCmd(GetEditor(), new Clipboard(comp)); paste_cmd->Execute(); paste_cmd->Log(); GetEditor()->GetViewer()->Align(comp, /* Center */ 4); } }