By default, layer properties are initialized when no .lyp file is specified in a technology

You can turn this feature off by disabling the "Initialize other layers with default properties"
option on the techology's "General" page.
This commit is contained in:
Matthias Koefferlein 2024-11-23 15:19:33 +01:00
parent 983611172c
commit 1c23d77073
3 changed files with 210 additions and 211 deletions

View File

@ -14,74 +14,18 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="6" column="0" colspan="4">
<widget class="Line" name="line_2">
<item row="1" column="2" colspan="2">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="0" colspan="4">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="group_le"/>
</item>
<item row="7" column="0" rowspan="2">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Database
unit</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="14" column="0" colspan="4">
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="4" column="3">
<widget class="QToolButton" name="browse_pb">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item row="15" column="1" rowspan="2" colspan="3">
<widget class="QListWidget" name="libs_lw">
<property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum>
</property>
</widget>
</item>
<item row="0" column="2" colspan="2">
<widget class="QLabel" name="label_5">
<property name="text">
<string>(Use the rename button to change this)</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="desc_le"/>
</item>
<item row="5" column="1" colspan="3">
<widget class="QLabel" name="label_3">
<property name="text">
<string>The base path is used to locate auxiliary files if those are specified with a relative path. If none is specified, the default path is used. The default path is the one from which a technology was imported.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</spacer>
</item>
<item row="7" column="1" colspan="3">
<widget class="QFrame" name="frame">
@ -124,122 +68,13 @@ unit</string>
</layout>
</widget>
</item>
<item row="4" column="1" colspan="2">
<widget class="QLineEdit" name="base_path_le"/>
</item>
<item row="2" column="2" colspan="2">
<widget class="QLabel" name="label_12">
<item row="2" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>(Used for creating tech groups)</string>
<string>Group</string>
</property>
</widget>
</item>
<item row="9" column="0" colspan="4">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
<item row="15" column="0">
<widget class="QLabel" name="libs_lbl">
<property name="text">
<string>Technology
specific
libraries</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Grids</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Base path</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Description</string>
</property>
</widget>
</item>
<item row="1" column="2" colspan="2">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="10" column="1" colspan="3">
<widget class="QFrame" name="frame_2">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLineEdit" name="grids_le"/>
</item>
<item>
<widget class="QLabel" name="label_14">
<property name="text">
<string>µm (g1,g2,...)</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="16" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="13" column="1" colspan="3">
<widget class="QGroupBox" name="lyp_grp">
<property name="title">
@ -284,10 +119,61 @@ libraries</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="add_other_layers_cbx">
</layout>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="name_le">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="8" column="1" colspan="3">
<widget class="QLabel" name="label_8">
<property name="text">
<string>The default database unit is used as database unit for freshly created layouts</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Name</string>
</property>
</widget>
</item>
<item row="10" column="1" colspan="3">
<widget class="QFrame" name="frame_2">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLineEdit" name="grids_le"/>
</item>
<item>
<widget class="QLabel" name="label_14">
<property name="text">
<string>Automatically add other layers</string>
<string>µm (g1,g2,...)</string>
</property>
</widget>
</item>
@ -305,37 +191,79 @@ properties</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<item row="5" column="1" colspan="3">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Name</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="name_le">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Group</string>
</property>
</widget>
</item>
<item row="8" column="1" colspan="3">
<widget class="QLabel" name="label_8">
<property name="text">
<string>The default database unit is used as database unit for freshly created layouts</string>
<string>The base path is used to locate auxiliary files if those are specified with a relative path. If none is specified, the default path is used. The default path is the one from which a technology was imported.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="11" column="1" colspan="3">
<widget class="QLabel" name="label_15">
<property name="text">
<string>These grids are available for selection from the &quot;View&quot; menu and will override the general ones. You can declare one grid as a strong default to enforce an editing grid from this list. To do so, add an exclamation mark to the grid - e.g. &quot;0.01!,0.02,0.05&quot;.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="16" column="0">
<widget class="QLabel" name="libs_lbl">
<property name="text">
<string>Technology
specific
libraries</string>
</property>
</widget>
</item>
<item row="15" column="0" colspan="4">
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="6" column="0" colspan="4">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="0" colspan="4">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="9" column="0" colspan="4">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Base path</string>
</property>
</widget>
</item>
<item row="12" column="0" colspan="4">
<spacer name="verticalSpacer">
<property name="orientation">
@ -352,13 +280,85 @@ properties</string>
</property>
</spacer>
</item>
<item row="11" column="1" colspan="3">
<widget class="QLabel" name="label_15">
<item row="7" column="0" rowspan="2">
<widget class="QLabel" name="label_7">
<property name="text">
<string>These grids are available for selection from the &quot;View&quot; menu and will override the general ones. You can declare one grid as a strong default to enforce an editing grid from this list. To do so, add an exclamation mark to the grid - e.g. &quot;0.01!,0.02,0.05&quot;.</string>
<string>Database
unit</string>
</property>
<property name="wordWrap">
<bool>true</bool>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="17" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="16" column="1" rowspan="2" colspan="3">
<widget class="QListWidget" name="libs_lw">
<property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum>
</property>
</widget>
</item>
<item row="2" column="2" colspan="2">
<widget class="QLabel" name="label_12">
<property name="text">
<string>(Used for creating tech groups)</string>
</property>
</widget>
</item>
<item row="4" column="3">
<widget class="QToolButton" name="browse_pb">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Grids</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Description</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="desc_le"/>
</item>
<item row="0" column="2" colspan="2">
<widget class="QLabel" name="label_5">
<property name="text">
<string>(Use the rename button to change this)</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<widget class="QLineEdit" name="base_path_le"/>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="group_le"/>
</item>
<item row="14" column="1" colspan="3">
<widget class="QCheckBox" name="add_other_layers_cbx">
<property name="text">
<string>Initialize other layers with default properties</string>
</property>
</widget>
</item>

View File

@ -173,11 +173,10 @@ TechBaseEditorPage::commit ()
if (! mp_ui->lyp_grp->isChecked ()) {
tech ()->set_layer_properties_file (std::string ());
tech ()->set_add_other_layers (true);
} else {
tech ()->set_layer_properties_file (tl::to_string (mp_ui->lyp_le->text ()));
tech ()->set_add_other_layers (mp_ui->add_other_layers_cbx->isChecked ());
}
tech ()->set_add_other_layers (mp_ui->add_other_layers_cbx->isChecked ());
}
void

View File

@ -2522,7 +2522,7 @@ LayoutViewBase::signal_apply_technology (lay::LayoutHandle *layout_handle)
lyp_file = tech->eff_layer_properties_file ();
}
if (! lyp_file.empty ()) {
if (! lyp_file.empty () || tech->add_other_layers ()) {
// interpolate the layout properties file name
tl::Eval expr;