WIP: refactoring - fixed a segfault.

This commit is contained in:
Matthias Koefferlein 2020-02-10 23:13:35 +01:00
parent 9cb81ce807
commit ad775413f3
2 changed files with 15 additions and 13 deletions

14
TODO
View File

@ -30,14 +30,16 @@ DONE 8. We can move menu initialization of LV-specifics to the LayoutView and
11. Tests for new features and GSI tests
12. Default ctor for MainWindow so a pymod script can instantiate one (?)
Tests:
- compare menu layout
- DONE: compare menu layout
- test every menu function
- adding of new tech
- adding of rulers/removing
- DONE: adding of rulers/removing
- ruby plugin (debugging, re-running)
- changing of macro title, move macro to different place
- funktionieren die check marks vor den menus? (Mode, selection modes, ruler template)
- check whether there is a replacement for the "cm_..." methods and tests them (at least one)
- check if changing the default grid works
- DONE: changing of macro title, move macro to different place
- DONE: funktionieren die check marks vor den menus? (Mode, selection modes, ruler template)
- DONE: check whether there is a replacement for the "cm_..." methods and tests them (at least one)
- DONE: check if changing the default grid works

View File

@ -265,16 +265,16 @@ TechnologyController::configure (const std::string &name, const std::string &val
void
TechnologyController::config_finalize ()
{
if (m_current_technology_updated) {
update_current_technology ();
m_current_technology_updated = false;
}
if (m_technologies_configured) {
update_menu ();
emit technologies_edited ();
m_technologies_configured = false;
}
if (m_current_technology_updated) {
update_current_technology ();
m_current_technology_updated = false;
}
}
bool
@ -316,8 +316,8 @@ TechnologyController::update_current_technology ()
tech_by_name.insert (std::make_pair (t->name (), t.operator-> ()));
}
int it = 0;
for (std::map<std::string, const db::Technology *>::const_iterator t = tech_by_name.begin (); t != tech_by_name.end (); ++t, ++it) {
size_t it = 0;
for (std::map<std::string, const db::Technology *>::const_iterator t = tech_by_name.begin (); t != tech_by_name.end () && it < m_tech_actions.size (); ++t, ++it) {
m_tech_actions[it].set_checked (t->second->name () == m_current_technology);
}
}