Fixed a segfault from the testsuite

This commit is contained in:
Matthias Köfferlein 2019-07-16 23:17:29 +02:00
parent 4e1736a181
commit 7fc907cf7e
3 changed files with 11 additions and 4 deletions

View File

@ -235,14 +235,19 @@ NetlistBrowserPage::set_highlight_style (QColor color, int line_width, int verte
}
void
NetlistBrowserPage::set_view (lay::LayoutView *view, unsigned int cv_index)
NetlistBrowserPage::set_view (lay::LayoutView *view, int cv_index)
{
if (mp_view) {
mp_view->layer_list_changed_event.remove (this, &NetlistBrowserPage::layer_list_changed);
}
mp_view = view;
m_cv_index = cv_index;
if (cv_index < 0) {
mp_view = 0;
m_cv_index = 0;
} else {
mp_view = view;
m_cv_index = (unsigned int) cv_index;
}
if (mp_view) {
mp_view->layer_list_changed_event.add (this, &NetlistBrowserPage::layer_list_changed);

View File

@ -85,7 +85,7 @@ public:
* 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.
*/
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

View File

@ -695,6 +695,8 @@ class RDB_TestClass < TestBase
assert_equal(view.num_rdbs, 2)
assert_equal(ot, 0)
mw.close_current_view
end
# scan_... methods