Merge branch 'enhancements'

This commit is contained in:
Matthias Koefferlein 2021-02-21 09:14:05 +01:00
commit ed2be6950d
3 changed files with 21 additions and 2 deletions

View File

@ -50,6 +50,7 @@
#include "tlAssert.h"
#include "tlStream.h"
#include "tlExceptions.h"
#include "tlExpression.h"
#include "dbMemStatistics.h"
#include "dbManager.h"
#include "dbStream.h"
@ -1773,13 +1774,17 @@ MainWindow::cm_goto_position ()
double x = 0.0, y = 0.0, s = 0.0;
std::string tt (tl::to_string (text));
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);
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);
} else {
current_view ()->goto_window (pt);

View File

@ -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 ()
{
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 "
"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,
"@brief Returns the technology name for the layout behind the given cell view\n"
"This method has been added in version 0.23.\n"

View File

@ -1566,6 +1566,7 @@ OASISReader::read_repetition ()
db::Coord x = 0;
for (unsigned long i = 0; i <= n; ++i) {
m_progress.set (m_stream.pos ());
db::Coord d = get_ucoord (lgrid);
if (d != 0) {
x += d;
@ -1590,6 +1591,7 @@ OASISReader::read_repetition ()
db::Coord y = 0;
for (unsigned long i = 0; i <= n; ++i) {
m_progress.set (m_stream.pos ());
db::Coord d = get_ucoord (lgrid);
if (d != 0) {
y += d;
@ -1633,6 +1635,7 @@ OASISReader::read_repetition ()
db::Vector p;
for (unsigned long i = 0; i <= n; ++i) {
m_progress.set (m_stream.pos ());
db::Vector d = get_gdelta (grid);
if (d != db::Vector ()) {
p += d;