mirror of https://github.com/KLayout/klayout.git
Merge branch 'enhancements'
This commit is contained in:
commit
ed2be6950d
|
|
@ -50,6 +50,7 @@
|
||||||
#include "tlAssert.h"
|
#include "tlAssert.h"
|
||||||
#include "tlStream.h"
|
#include "tlStream.h"
|
||||||
#include "tlExceptions.h"
|
#include "tlExceptions.h"
|
||||||
|
#include "tlExpression.h"
|
||||||
#include "dbMemStatistics.h"
|
#include "dbMemStatistics.h"
|
||||||
#include "dbManager.h"
|
#include "dbManager.h"
|
||||||
#include "dbStream.h"
|
#include "dbStream.h"
|
||||||
|
|
@ -1773,13 +1774,17 @@ MainWindow::cm_goto_position ()
|
||||||
|
|
||||||
double x = 0.0, y = 0.0, s = 0.0;
|
double x = 0.0, y = 0.0, s = 0.0;
|
||||||
std::string tt (tl::to_string (text));
|
std::string tt (tl::to_string (text));
|
||||||
|
|
||||||
tl::Extractor ex (tt.c_str ());
|
tl::Extractor ex (tt.c_str ());
|
||||||
ex >> x >> "," >> y;
|
x = tl::Eval ().parse (ex).execute ().to_double ();
|
||||||
|
ex.test (",");
|
||||||
|
y = tl::Eval ().parse (ex).execute ().to_double ();
|
||||||
|
|
||||||
db::DPoint pt (x, y);
|
db::DPoint pt (x, y);
|
||||||
|
|
||||||
if (! ex.at_end ()) {
|
if (! ex.at_end ()) {
|
||||||
ex >> "," >> s >> tl::Extractor::end ();
|
ex.test (",");
|
||||||
|
s = tl::Eval ().parse (ex).execute ().to_double ();
|
||||||
current_view ()->goto_window (pt, s);
|
current_view ()->goto_window (pt, s);
|
||||||
} else {
|
} else {
|
||||||
current_view ()->goto_window (pt);
|
current_view ()->goto_window (pt);
|
||||||
|
|
|
||||||
|
|
@ -1977,6 +1977,11 @@ static std::string get_technology (const lay::CellViewRef *cv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static tl::Event &get_technology_changed_event (lay::CellViewRef *cv)
|
||||||
|
{
|
||||||
|
return (*cv)->technology_changed_event;
|
||||||
|
}
|
||||||
|
|
||||||
static lay::CellViewRef get_active_cellview_ref ()
|
static lay::CellViewRef get_active_cellview_ref ()
|
||||||
{
|
{
|
||||||
lay::LayoutView *view = lay::LayoutView::current ();
|
lay::LayoutView *view = lay::LayoutView::current ();
|
||||||
|
|
@ -2183,6 +2188,12 @@ Class<lay::CellViewRef> decl_CellView ("lay", "CellView",
|
||||||
"fashion, i.e. describing each instance in detail, not just by cell indexes. If "
|
"fashion, i.e. describing each instance in detail, not just by cell indexes. If "
|
||||||
"the context and target cell are identical, the context path is empty."
|
"the context and target cell are identical, the context path is empty."
|
||||||
) +
|
) +
|
||||||
|
event_ext ("on_technology_changed", &get_technology_changed_event,
|
||||||
|
"@brief An event indicating that the technology has changed\n"
|
||||||
|
"This event is triggered when the CellView is attached to a different technology.\n"
|
||||||
|
"\n"
|
||||||
|
"This event has been introduced in version 0.27.\n"
|
||||||
|
) +
|
||||||
method_ext ("technology", &get_technology,
|
method_ext ("technology", &get_technology,
|
||||||
"@brief Returns the technology name for the layout behind the given cell view\n"
|
"@brief Returns the technology name for the layout behind the given cell view\n"
|
||||||
"This method has been added in version 0.23.\n"
|
"This method has been added in version 0.23.\n"
|
||||||
|
|
|
||||||
|
|
@ -1566,6 +1566,7 @@ OASISReader::read_repetition ()
|
||||||
|
|
||||||
db::Coord x = 0;
|
db::Coord x = 0;
|
||||||
for (unsigned long i = 0; i <= n; ++i) {
|
for (unsigned long i = 0; i <= n; ++i) {
|
||||||
|
m_progress.set (m_stream.pos ());
|
||||||
db::Coord d = get_ucoord (lgrid);
|
db::Coord d = get_ucoord (lgrid);
|
||||||
if (d != 0) {
|
if (d != 0) {
|
||||||
x += d;
|
x += d;
|
||||||
|
|
@ -1590,6 +1591,7 @@ OASISReader::read_repetition ()
|
||||||
|
|
||||||
db::Coord y = 0;
|
db::Coord y = 0;
|
||||||
for (unsigned long i = 0; i <= n; ++i) {
|
for (unsigned long i = 0; i <= n; ++i) {
|
||||||
|
m_progress.set (m_stream.pos ());
|
||||||
db::Coord d = get_ucoord (lgrid);
|
db::Coord d = get_ucoord (lgrid);
|
||||||
if (d != 0) {
|
if (d != 0) {
|
||||||
y += d;
|
y += d;
|
||||||
|
|
@ -1633,6 +1635,7 @@ OASISReader::read_repetition ()
|
||||||
|
|
||||||
db::Vector p;
|
db::Vector p;
|
||||||
for (unsigned long i = 0; i <= n; ++i) {
|
for (unsigned long i = 0; i <= n; ++i) {
|
||||||
|
m_progress.set (m_stream.pos ());
|
||||||
db::Vector d = get_gdelta (grid);
|
db::Vector d = get_gdelta (grid);
|
||||||
if (d != db::Vector ()) {
|
if (d != db::Vector ()) {
|
||||||
p += d;
|
p += d;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue