- Fix the bug about reconfiguring a policy don't resetting the
History the Hard Way(tm) git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1026 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
cb1d85a4cc
commit
22dded7243
5 changed files with 31 additions and 12 deletions
|
@ -291,7 +291,8 @@ GuiBuilder::on_configure_cpu_policy()
|
|||
{
|
||||
using namespace Gtk;
|
||||
|
||||
CPUPolicy* policy = Simulation::get_instance().get_policy();
|
||||
Simulation& sim = Simulation::get_instance();
|
||||
CPUPolicy* policy = sim.get_policy();
|
||||
|
||||
if(policy == NULL)
|
||||
{
|
||||
|
@ -299,13 +300,17 @@ GuiBuilder::on_configure_cpu_policy()
|
|||
_("<b>No CPU policy is currently selected.</b>\nPlease choose one before trying to configure it."),
|
||||
true, MESSAGE_WARNING, BUTTONS_OK, true);
|
||||
warn.run();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
PolicyParameters& params = policy->get_parameters();
|
||||
ConfigurePolicyDialog config_dialog(_("Configuring CPU Policy ") + policy->get_name(),
|
||||
get_initial_window(), policy->get_description(), params);
|
||||
config_dialog.run();
|
||||
|
||||
if(config_dialog.run() == RESPONSE_OK)
|
||||
{
|
||||
sim.stop();
|
||||
sim.get_history().reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -314,7 +319,8 @@ GuiBuilder::on_configure_resource_policy()
|
|||
{
|
||||
using namespace Gtk;
|
||||
|
||||
ResourcePolicy* policy = Simulation::get_instance().get_resource_policy();
|
||||
Simulation& sim = Simulation::get_instance();
|
||||
ResourcePolicy* policy = sim.get_resource_policy();
|
||||
|
||||
if(policy == NULL)
|
||||
{
|
||||
|
@ -328,7 +334,12 @@ GuiBuilder::on_configure_resource_policy()
|
|||
PolicyParameters& params = policy->get_parameters();
|
||||
ConfigurePolicyDialog config_dialog(_("Configuring CPU Policy ") + policy->get_name(),
|
||||
get_initial_window(), policy->get_description(), params);
|
||||
config_dialog.run();
|
||||
|
||||
if(config_dialog.run() == RESPONSE_OK)
|
||||
{
|
||||
sim.stop();
|
||||
sim.get_history().reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue