- 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:
parent
116400defd
commit
8cfa2469b2
|
@ -94,7 +94,7 @@ GuiBuilder::on_view_show_threads_activate()
|
||||||
{
|
{
|
||||||
_show_threads = !_show_threads;
|
_show_threads = !_show_threads;
|
||||||
_simulation_widget->set_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().set_show_threads(_show_threads);
|
||||||
_holt_container.get_holt_widget().update(Simulation::get_instance());
|
_holt_container.get_holt_widget().update(Simulation::get_instance());
|
||||||
}
|
}
|
||||||
|
|
|
@ -499,8 +499,8 @@ HoltWidget::update(const Simulation& changed_simulation)
|
||||||
std::cout << "HoltWidget::update - Simulation" << endl;
|
std::cout << "HoltWidget::update - Simulation" << endl;
|
||||||
// Force redraw
|
// Force redraw
|
||||||
//redraw();
|
//redraw();
|
||||||
acquire();
|
// acquire();
|
||||||
resize_redraw();
|
// resize_redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -510,8 +510,8 @@ HoltWidget::update(const History& changed_history)
|
||||||
std::cout << "HoltWidget::update - History" << endl;
|
std::cout << "HoltWidget::update - History" << endl;
|
||||||
// Force redraw
|
// Force redraw
|
||||||
//redraw();
|
//redraw();
|
||||||
//acquire();
|
acquire();
|
||||||
//resize_redraw();
|
resize_redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,8 @@ SimulationWidget::update(const History& /* changed_history */ )
|
||||||
// Force redraw
|
// Force redraw
|
||||||
_last_drawn = 0;
|
_last_drawn = 0;
|
||||||
_partial_redraw = false;
|
_partial_redraw = false;
|
||||||
count_elements();
|
// MOVED in calc_drawing_size(...)
|
||||||
|
// count_elements();
|
||||||
resize_redraw();
|
resize_redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -439,6 +440,8 @@ SimulationWidget::calc_drawing_size(cairo_t* ctx, size_t& width, size_t& height)
|
||||||
{
|
{
|
||||||
if(!_simulation)
|
if(!_simulation)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
count_elements();
|
||||||
const History& hist = _simulation->get_history();
|
const History& hist = _simulation->get_history();
|
||||||
// const Environment::Processes& processes = hist.get_last_environment().get_processes();
|
// const Environment::Processes& processes = hist.get_last_environment().get_processes();
|
||||||
int pos = _simulation->get_history().get_front();
|
int pos = _simulation->get_history().get_front();
|
||||||
|
|
Loading…
Reference in New Issue