From 59dadcdd38c6f82b3852ad0beed08585580824b7 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Mon, 17 Apr 2017 18:22:36 +0200 Subject: [PATCH] WIP: small bug fixes - LayoutView should accept technology names that are valid only - CellView now also sends an "active cellview changed" event when loading a layout in "replace layout" mode. --- src/laybasic/layCellView.cc | 6 +++++- src/laybasic/layLayoutView.cc | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/laybasic/layCellView.cc b/src/laybasic/layCellView.cc index 86e4bd46d..0736fdb6f 100644 --- a/src/laybasic/layCellView.cc +++ b/src/laybasic/layCellView.cc @@ -217,7 +217,11 @@ void LayoutHandle::set_tech_name (const std::string &tn) { if (tn != m_tech_name) { - m_tech_name = tn; + if (lay::Technologies::instance ()->has_technology (tn)) { + m_tech_name = tn; + } else { + m_tech_name = std::string (); + } technology_changed_event (); } } diff --git a/src/laybasic/layLayoutView.cc b/src/laybasic/layLayoutView.cc index 06c674f3c..c5aa79673 100644 --- a/src/laybasic/layLayoutView.cc +++ b/src/laybasic/layLayoutView.cc @@ -3124,6 +3124,9 @@ LayoutView::load_layout (const std::string &filename, const db::LoadLayoutOption } update_content (); + // this event may not be generated otherwise: + active_cellview_changed (cv_index); + return cv_index; }