mirror of https://github.com/KLayout/klayout.git
Fixed a segfault from the testsuite
This commit is contained in:
parent
4e1736a181
commit
7fc907cf7e
|
|
@ -235,14 +235,19 @@ NetlistBrowserPage::set_highlight_style (QColor color, int line_width, int verte
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
NetlistBrowserPage::set_view (lay::LayoutView *view, unsigned int cv_index)
|
NetlistBrowserPage::set_view (lay::LayoutView *view, int cv_index)
|
||||||
{
|
{
|
||||||
if (mp_view) {
|
if (mp_view) {
|
||||||
mp_view->layer_list_changed_event.remove (this, &NetlistBrowserPage::layer_list_changed);
|
mp_view->layer_list_changed_event.remove (this, &NetlistBrowserPage::layer_list_changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cv_index < 0) {
|
||||||
|
mp_view = 0;
|
||||||
|
m_cv_index = 0;
|
||||||
|
} else {
|
||||||
mp_view = view;
|
mp_view = view;
|
||||||
m_cv_index = cv_index;
|
m_cv_index = (unsigned int) cv_index;
|
||||||
|
}
|
||||||
|
|
||||||
if (mp_view) {
|
if (mp_view) {
|
||||||
mp_view->layer_list_changed_event.add (this, &NetlistBrowserPage::layer_list_changed);
|
mp_view->layer_list_changed_event.add (this, &NetlistBrowserPage::layer_list_changed);
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ public:
|
||||||
* If that pointer is non-null, the browser will attach itself to
|
* If that pointer is non-null, the browser will attach itself to
|
||||||
* the view and provide highlights for the selected markers inside the given cellview.
|
* the view and provide highlights for the selected markers inside the given cellview.
|
||||||
*/
|
*/
|
||||||
void set_view (lay::LayoutView *view, unsigned int cv_index);
|
void set_view (lay::LayoutView *view, int cv_index);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Attaches the page to a L2N DB
|
* @brief Attaches the page to a L2N DB
|
||||||
|
|
|
||||||
|
|
@ -695,6 +695,8 @@ class RDB_TestClass < TestBase
|
||||||
assert_equal(view.num_rdbs, 2)
|
assert_equal(view.num_rdbs, 2)
|
||||||
assert_equal(ot, 0)
|
assert_equal(ot, 0)
|
||||||
|
|
||||||
|
mw.close_current_view
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# scan_... methods
|
# scan_... methods
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue