mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-01 10:27:53 +02:00
WIP: bugfixed tech controller, more refactoring
Resolved the dependencies between MainWindow, TechController and MacroController somewhat more. * The macro controller now listens to the tech controller for the active technology * The tech controller has more responsibility now * Some functionality has been taken out of the MainWindow and put into the controller's implementation
This commit is contained in:
@@ -1123,14 +1123,17 @@ AbstractMenu::find_item (const std::string &path)
|
||||
return std::make_pair ((AbstractMenuItem *) 0, m_root.children.end ());
|
||||
}
|
||||
|
||||
} else if (extr.test ("begin")) {
|
||||
return std::make_pair (parent, parent->children.begin ());
|
||||
} else if (extr.test ("end")) {
|
||||
return std::make_pair (parent, parent->children.end ());
|
||||
} else {
|
||||
|
||||
std::string n;
|
||||
extr.read (n, ".+");
|
||||
|
||||
if (n == "begin") {
|
||||
return std::make_pair (parent, parent->children.begin ());
|
||||
} else if (n == "end") {
|
||||
return std::make_pair (parent, parent->children.end ());
|
||||
}
|
||||
|
||||
std::string name (parent->name ());
|
||||
if (! name.empty ()) {
|
||||
name += ".";
|
||||
|
||||
@@ -197,7 +197,7 @@ PluginDeclaration::init_menu ()
|
||||
m_mouse_mode_action.qaction ()->setData (QVariant (id ()));
|
||||
|
||||
menu.insert_item ("edit_menu.mode_menu.end", name, m_mouse_mode_action);
|
||||
menu.insert_item ("@toolbar.end", name, m_mouse_mode_action);
|
||||
menu.insert_item ("@toolbar.end_modes", name, m_mouse_mode_action);
|
||||
|
||||
gtf::action_connect (m_mouse_mode_action.qaction (), SIGNAL (triggered ()), this, SLOT (mode_triggered ()));
|
||||
|
||||
|
||||
@@ -184,6 +184,12 @@ Technologies::end_updates ()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Technologies::end_updates_no_event ()
|
||||
{
|
||||
m_in_update = false;
|
||||
m_changed = false;
|
||||
}
|
||||
|
||||
bool
|
||||
Technologies::has_technology (const std::string &name) const
|
||||
|
||||
@@ -149,6 +149,14 @@ public:
|
||||
*/
|
||||
void end_updates ();
|
||||
|
||||
/**
|
||||
* @brief Ends a bulk operation
|
||||
* This version does not send an technologies_changed event but just cancels the bulk
|
||||
* operation. begin_updates/end_updates_no_event is essentially equivalent to blocking
|
||||
* signals.
|
||||
*/
|
||||
void end_updates_no_event ();
|
||||
|
||||
/**
|
||||
* @brief Checks, if a technology with the given name exists
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user