You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I now better understood what's going on and there is a workaround.
Actually, the wrong class gets assigned because the first time, a C++ object is bound in Python space, the type will be assigned. In this case, there are two types that apply (MainWindow and PluginRoot). So if the MainWindow object is bound the first time in MainWindow context (i.e. through "pya.MainWindow.instance()", it gets MainWindow class. If it's bound the first time in "PluginRoot" context, it gets "PluginRoot" class. The latter happens implicitly for example for the "root" parameter in "PluginFactory.create_plugin".
When the plugin is created, the "root" argument of "create_plugin" will bind the MainWindow object to PluginRoot unless it was bound otherwise. Hence there is a simple workaround by explicitly binding before "create_plugin" is called:
# (workaround for bug 191)
# will bind the MainWindow object to the MainWindow class before anything bad happens
self.register(-1000, "set_origin", "Cell Origin")
def create_plugin(self, manager, root, view):
Please note that this is only because of the ambiguity of MainWindow/PluginRoot. All other objects are not affected by this issue.
* Enhancement: KLayout/klayout#199
Added an option to export DXF polygons as LINE objects
* Bugfix: KLayout/klayout#198
Stitching of DXF contours wasn't taking nearest neighbours
* Bugfix: KLayout/klayout#191
MainWindow/PluginRoot classes got mixed up
As a side effect of this fix, layout views can now
be configured individually. This wasn't working
* Bugfix: KLayout/klayout#162
GDS2 LIBNAME was not maintained on "File/Save".
* Bugfix: KLayout/klayout#166
Internal error when writing GDS files (breaking of polygons)
* Bugfix: KLayout/klayout#172
DEF reader did not pull vias from LEF
* Bugfix: KLayout/klayout#174
Performance issue with many layers with width >1
* Bugfix: KLayout/klayout#176
Painting issue with texts
* Bugfix: KLayout/klayout#185
Hash values available as __hash__ standard method now
* Bugfix: some potential memory corruption issues fixed
During the efforts for making the code base compatible
with MSVC, some potential candidates for memory corruption
have been identified and fixed.
These fixes are included in this release.