Ejemplo n.º 1
0
void InsertFxPopup::onInsert()
{
	TFx *fx = createFx();
	if (fx) {
		TApp *app = TApp::instance();
		TXsheetHandle *xshHandle = app->getCurrentXsheet();
		QList<TFxP> fxs;
		QList<TFxCommand::Link> links;
		FxSelection *selection = dynamic_cast<FxSelection *>(app->getCurrentSelection()->getSelection());
		if (selection) {
			fxs = selection->getFxs();
			links = selection->getLinks();
		}
		TFxCommand::insertFx(fx, fxs, links, app,
							 app->getCurrentColumn()->getColumnIndex(),
							 app->getCurrentFrame()->getFrameIndex());
		xshHandle->notifyXsheetChanged();
	}
}