mirror of https://github.com/KLayout/klayout.git
Use image copy instead of reference for icons. I hope that fixes the problem.
This commit is contained in:
parent
ec2c160792
commit
fc7011d8fd
|
|
@ -137,7 +137,7 @@ ShapePropertiesPage::icon (size_t entry, int w, int h) const
|
|||
for (auto lp = view->begin_layers (view->current_layer_list ()); ! lp.at_end (); ++lp) {
|
||||
const lay::LayerPropertiesNode *ln = lp.operator-> ();
|
||||
if (ln->cellview_index () == cv_index && ln->layer_index () == layer) {
|
||||
return QIcon (QPixmap::fromImage (view->icon_for_layer (lp, w, h).to_image ()));
|
||||
return QIcon (QPixmap::fromImage (view->icon_for_layer (lp, w, h).to_image_copy ()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -721,7 +721,7 @@ LayerSelectionComboBox::do_update_layer_list ()
|
|||
if (lp->cellview_index () == mp_private->cv_index && ! lp->has_children () && (mp_private->all_layers || lp->layer_index () >= 0) && lp->source (true).layer_props () != db::LayerProperties ()) {
|
||||
std::pair <db::LayerProperties, int> k (lp->source (true).layer_props (), lp->layer_index ());
|
||||
name_for_layer.insert (std::make_pair (k, lp->display_string (mp_private->view, true, true /*always show source*/)));
|
||||
QIcon icon = QIcon (QPixmap::fromImage (mp_private->view->icon_for_layer (lp, icon_width, icon_height, dpr, 0, true).to_image ()));
|
||||
QIcon icon = QIcon (QPixmap::fromImage (mp_private->view->icon_for_layer (lp, icon_width, icon_height, dpr, 0, true).to_image_copy ()));
|
||||
icon_for_layer.insert (std::make_pair (k, icon));
|
||||
mp_private->layers.push_back (k);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue