- holt+simulation widgets: fixed errors on Simulation/History update

- gui_builder: resize and redraw showing/hidig threads on widgets



git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1043 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
paolo 2006-09-07 15:01:29 +00:00
parent 116400defd
commit 8cfa2469b2
3 changed files with 9 additions and 6 deletions

View File

@ -94,7 +94,7 @@ GuiBuilder::on_view_show_threads_activate()
{
_show_threads = !_show_threads;
_simulation_widget->set_show_threads(_show_threads);
_simulation_widget->redraw();
_simulation_widget->resize_redraw();
_holt_container.get_holt_widget().set_show_threads(_show_threads);
_holt_container.get_holt_widget().update(Simulation::get_instance());
}

View File

@ -499,8 +499,8 @@ HoltWidget::update(const Simulation& changed_simulation)
std::cout << "HoltWidget::update - Simulation" << endl;
// Force redraw
//redraw();
acquire();
resize_redraw();
// acquire();
// resize_redraw();
}
@ -510,8 +510,8 @@ HoltWidget::update(const History& changed_history)
std::cout << "HoltWidget::update - History" << endl;
// Force redraw
//redraw();
//acquire();
//resize_redraw();
acquire();
resize_redraw();
}

View File

@ -125,7 +125,8 @@ SimulationWidget::update(const History& /* changed_history */ )
// Force redraw
_last_drawn = 0;
_partial_redraw = false;
count_elements();
// MOVED in calc_drawing_size(...)
// count_elements();
resize_redraw();
}
@ -439,6 +440,8 @@ SimulationWidget::calc_drawing_size(cairo_t* ctx, size_t& width, size_t& height)
{
if(!_simulation)
return;
count_elements();
const History& hist = _simulation->get_history();
// const Environment::Processes& processes = hist.get_last_environment().get_processes();
int pos = _simulation->get_history().get_front();