- Remove useless pointer from SimulationController member data

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@950 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-08-28 20:23:42 +00:00
parent 0cf9c77835
commit ba60be88bc
2 changed files with 8 additions and 6 deletions

View File

@ -291,8 +291,8 @@ GuiBuilder::open_file(const std::string& filename)
// --------------------------------- // ---------------------------------
SimulationController::SimulationController(Simulation& simulation, Glib::RefPtr<Xml> main_window) SimulationController::SimulationController(Simulation& simulation, Glib::RefPtr<Xml> refXml)
: _sim(simulation), _refXml(main_window), _break_requested(false) : _sim(simulation), _break_requested(false)
{ {
using namespace Gtk; using namespace Gtk;
@ -301,9 +301,10 @@ SimulationController::SimulationController(Simulation& simulation, Glib::RefPtr<
// Start, pause and stop simulation from the toolbar // Start, pause and stop simulation from the toolbar
// TODO: can we use action groups instead of this? // TODO: can we use action groups instead of this?
_refXml->get_widget("ToolBar.Play", _toolbt_start); refXml->get_widget("ToolBar.Play", _toolbt_start);
_refXml->get_widget("ToolBar.Pause", _toolbt_pause); refXml->get_widget("ToolBar.Pause", _toolbt_pause);
_refXml->get_widget("ToolBar.Stop", _toolbt_stop); refXml->get_widget("ToolBar.Stop", _toolbt_stop);
_toolbt_start->signal_clicked().connect(sigc::mem_fun(*this, &SimulationController::on_simulation_run)); _toolbt_start->signal_clicked().connect(sigc::mem_fun(*this, &SimulationController::on_simulation_run));
_toolbt_pause->signal_clicked().connect(sigc::mem_fun(*this, &SimulationController::on_simulation_pause)); _toolbt_pause->signal_clicked().connect(sigc::mem_fun(*this, &SimulationController::on_simulation_pause));
_toolbt_stop->signal_clicked().connect(sigc::mem_fun(*this, &SimulationController::on_simulation_stop)); _toolbt_stop->signal_clicked().connect(sigc::mem_fun(*this, &SimulationController::on_simulation_stop));
@ -358,7 +359,9 @@ SimulationController::on_simulation_stop()
void void
SimulationController::update(const Simulation& simulation) SimulationController::update(const Simulation& simulation)
{ {
#ifndef NDEBUG
std::cerr << "SimulationController::update(), simulation state == " << std::hex << simulation.get_state() << std::endl; std::cerr << "SimulationController::update(), simulation state == " << std::hex << simulation.get_state() << std::endl;
#endif
if(_break_requested) if(_break_requested)
return; return;

View File

@ -60,7 +60,6 @@ namespace sgpem
bool run_simulation_adaptor(); bool run_simulation_adaptor();
Simulation& _sim; Simulation& _sim;
Glib::RefPtr<Gnome::Glade::Xml> _refXml;
bool _break_requested; bool _break_requested;
Gtk::ToolButton* _toolbt_start; Gtk::ToolButton* _toolbt_start;