Ejemplo n.º 1
0
void EffectEditor::effectTypeChanged()
{
	std::string newEffectName("");

	// Get the currently selected effect name from the combo box
	if (_effectTypeCombo->GetSelection() != wxNOT_FOUND)
	{
		wxStringClientData* data = dynamic_cast<wxStringClientData*>(
			_effectTypeCombo->GetClientObject(_effectTypeCombo->GetSelection()));
		assert(data != NULL);

		newEffectName = data->GetData().ToStdString();
	}

	// Get the effect
	ResponseEffect& effect = _response.getResponseEffect(_effectIndex);

	// Set the name of the effect and trigger an argument list update
	effect.setName(newEffectName);
	effect.clearArgumentList();
	effect.buildArgumentList();

	// Rebuild the argument list basing on this new effect
	createArgumentWidgets(effect);
}
Ejemplo n.º 2
0
void EffectEditor::effectTypeChanged()
{
	std::string newEffectName("");

	// Get the currently selected effect name from the combo box
	Gtk::TreeModel::iterator iter = _effectTypeCombo->get_active();

	if (iter)
	{
		newEffectName = Glib::ustring((*iter)[_effectColumns.name]);
	}

	// Get the effect
	ResponseEffect& effect = _response.getResponseEffect(_effectIndex);

	// Set the name of the effect and trigger an argument list update
	effect.setName(newEffectName);
	effect.clearArgumentList();
	effect.buildArgumentList();

	// Rebuild the argument list basing on this new effect
	createArgumentWidgets(effect);
}