mirror of https://github.com/KLayout/klayout.git
Merge branch 'issue-1234'
This commit is contained in:
commit
9e6965751d
|
|
@ -264,21 +264,11 @@ LayoutViewBase::LayoutViewBase (lay::LayoutView *ui, db::Manager *manager, bool
|
|||
init (manager);
|
||||
}
|
||||
|
||||
LayoutViewBase::LayoutViewBase (lay::LayoutView *ui, lay::LayoutViewBase *source, db::Manager *manager, bool editable, lay::Plugin *plugin_parent, unsigned int options)
|
||||
: lay::Dispatcher (plugin_parent, false /*not standalone*/),
|
||||
mp_ui (ui),
|
||||
dm_redraw (this, &LayoutViewBase::redraw),
|
||||
m_editable (editable),
|
||||
m_options (options),
|
||||
m_annotation_shapes (manager)
|
||||
void
|
||||
LayoutViewBase::copy_from (lay::LayoutViewBase *source)
|
||||
{
|
||||
// either it's us or the parent has a dispatcher
|
||||
tl_assert (dispatcher () != 0);
|
||||
|
||||
m_annotation_shapes = source->m_annotation_shapes;
|
||||
|
||||
init (manager);
|
||||
|
||||
// set the handle reference and clear all cell related stuff
|
||||
m_cellviews = source->cellview_list ();
|
||||
m_hidden_cells = source->m_hidden_cells;
|
||||
|
|
@ -289,6 +279,8 @@ LayoutViewBase::LayoutViewBase (lay::LayoutView *ui, lay::LayoutViewBase *source
|
|||
m_synchronous = source->synchronous ();
|
||||
m_drawing_workers = source->drawing_workers ();
|
||||
|
||||
begin_layer_updates ();
|
||||
|
||||
// duplicate the layer properties
|
||||
for (size_t i = 0; i < source->m_layer_properties_lists.size (); ++i) {
|
||||
if (i >= m_layer_properties_lists.size ()) {
|
||||
|
|
@ -299,6 +291,8 @@ LayoutViewBase::LayoutViewBase (lay::LayoutView *ui, lay::LayoutViewBase *source
|
|||
m_layer_properties_lists [i]->attach_view (this, (unsigned int) i);
|
||||
}
|
||||
|
||||
end_layer_updates ();
|
||||
|
||||
if (! m_layer_properties_lists.empty ()) {
|
||||
mp_canvas->set_dither_pattern (m_layer_properties_lists [0]->dither_pattern ());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,16 +192,16 @@ public:
|
|||
*/
|
||||
LayoutViewBase (lay::LayoutView *ui, db::Manager *mgr, bool editable, lay::Plugin *plugin_parent, unsigned int options = (unsigned int) LV_Normal);
|
||||
|
||||
/**
|
||||
* @brief Constructor (clone from another view)
|
||||
*/
|
||||
LayoutViewBase (lay::LayoutView *ui, lay::LayoutViewBase *source, db::Manager *mgr, bool editable, lay::Plugin *plugin_parent, unsigned int options = (unsigned int) LV_Normal);
|
||||
|
||||
/**
|
||||
* @brief Destructor
|
||||
*/
|
||||
~LayoutViewBase ();
|
||||
|
||||
/**
|
||||
* @brief Copies settings from the source view
|
||||
*/
|
||||
void copy_from (lay::LayoutViewBase *source);
|
||||
|
||||
/**
|
||||
* @brief Gets the current mode
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -35,8 +35,9 @@ LayoutView::LayoutView (db::Manager *mgr, bool editable, lay::Plugin *plugin_par
|
|||
}
|
||||
|
||||
LayoutView::LayoutView (lay::LayoutView *source, db::Manager *mgr, bool editable, lay::Plugin *plugin_parent, unsigned int options)
|
||||
: LayoutViewBase (this, source, mgr, editable, plugin_parent, options)
|
||||
: LayoutViewBase (this, mgr, editable, plugin_parent, options)
|
||||
{
|
||||
copy_from (source);
|
||||
config_setup ();
|
||||
finish ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ LayoutView::LayoutView (db::Manager *manager, bool editable, lay::Plugin *plugin
|
|||
}
|
||||
|
||||
LayoutView::LayoutView (lay::LayoutView *source, db::Manager *manager, bool editable, lay::Plugin *plugin_parent, unsigned int options)
|
||||
: LayoutViewBase (this, source, manager, editable, plugin_parent, options),
|
||||
: LayoutViewBase (this, manager, editable, plugin_parent, options),
|
||||
mp_widget (0),
|
||||
dm_setup_editor_option_pages (this, &LayoutView::do_setup_editor_options_pages)
|
||||
{
|
||||
|
|
@ -284,6 +284,8 @@ LayoutView::LayoutView (lay::LayoutView *source, db::Manager *manager, bool edit
|
|||
|
||||
init_ui ();
|
||||
|
||||
copy_from (source);
|
||||
|
||||
bookmarks (source->bookmarks ());
|
||||
LayoutView::set_active_cellview_index (source->active_cellview_index ());
|
||||
}
|
||||
|
|
@ -300,7 +302,7 @@ LayoutView::LayoutView (db::Manager *manager, bool editable, lay::Plugin *plugin
|
|||
}
|
||||
|
||||
LayoutView::LayoutView (lay::LayoutView *source, db::Manager *manager, bool editable, lay::Plugin *plugin_parent, LayoutViewWidget *widget, unsigned int options)
|
||||
: LayoutViewBase (this, source, manager, editable, plugin_parent, options),
|
||||
: LayoutViewBase (this, manager, editable, plugin_parent, options),
|
||||
mp_widget (widget),
|
||||
dm_setup_editor_option_pages (this, &LayoutView::do_setup_editor_options_pages)
|
||||
{
|
||||
|
|
@ -309,6 +311,8 @@ LayoutView::LayoutView (lay::LayoutView *source, db::Manager *manager, bool edit
|
|||
|
||||
init_ui ();
|
||||
|
||||
copy_from (source);
|
||||
|
||||
bookmarks (source->bookmarks ());
|
||||
LayoutView::set_active_cellview_index (source->active_cellview_index ());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue