From c8a4d25b517d618a22951fd2c64f00599c25437a Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Wed, 15 Jul 2020 00:35:38 +0200 Subject: [PATCH] WIP: enabling selection_changed event --- .../laybasic/gsiDeclLayNetlistBrowserDialog.cc | 10 +++++----- src/laybasic/laybasic/layNetlistBrowserPage.cc | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/laybasic/laybasic/gsiDeclLayNetlistBrowserDialog.cc b/src/laybasic/laybasic/gsiDeclLayNetlistBrowserDialog.cc index 016afa8d8..fc1ce6ba3 100644 --- a/src/laybasic/laybasic/gsiDeclLayNetlistBrowserDialog.cc +++ b/src/laybasic/laybasic/gsiDeclLayNetlistBrowserDialog.cc @@ -123,7 +123,7 @@ Class decl_NetlistObjectPath ("lay", "NetlistObjectPath" gsi::method_ext ("device", &device, "@brief Gets the device the path points to.\n" ) + - gsi::method ("is_null", &lay::NetlistObjectPath::is_null, + gsi::method ("is_null?", &lay::NetlistObjectPath::is_null, "@brief Returns a value indicating whether the path is an empty one.\n" ), "@brief An object describing the instantiation of an object.\n" @@ -152,13 +152,13 @@ Class decl_NetlistBrowserDialog ("lay", "NetlistBrows ) + gsi::event ("on_selection_changed", &lay::NetlistBrowserDialog::selection_changed_event, "@brief This event is triggered when the selection changed.\n" - "The selection can be obtained with \\selected_nets, \\selected_devices, \\selected_subcircuits and \\selected_circuits." + "The selection can be obtained with \\current_path_first, \\current_path_second, \\selected_nets, \\selected_devices, \\selected_subcircuits and \\selected_circuits." ) + gsi::event ("on_probe", &lay::NetlistBrowserDialog::probe_event, gsi::arg ("first_path"), gsi::arg ("second_path"), "@brief This event is triggered when a net is probed.\n" - "The first path will indicate the location of the probed net in terms of " - "\\subcircuit_path will contain the subcircuit objects leading to the probed net from the circuit given by \\root_circuit. " - "This path may not be complete - it may contain null entries if a cell instance can't be associated with a subcircuit." + "The first path will indicate the location of the probed net in terms of two paths: one describing the instantiation of the " + "net in layout space and one in schematic space. Both objects are \\NetlistObjectPath objects which hold the root circuit, the " + "chain of subcircuits leading to the circuit containing the net and the net itself." ) + gsi::method ("db", &lay::NetlistBrowserDialog::db, "@brief Gets the database the browser is connected to.\n" diff --git a/src/laybasic/laybasic/layNetlistBrowserPage.cc b/src/laybasic/laybasic/layNetlistBrowserPage.cc index 1bd2019e1..15fabc830 100644 --- a/src/laybasic/laybasic/layNetlistBrowserPage.cc +++ b/src/laybasic/laybasic/layNetlistBrowserPage.cc @@ -473,6 +473,8 @@ NetlistBrowserPage::selection_changed () QModelIndex current = directory_tree->selectionModel ()->currentIndex (); highlight (model->path_from_index (current)); + + selection_changed_event (); } void @@ -896,8 +898,6 @@ NetlistBrowserPage::highlight (const NetlistObjectsPath &path) adjust_view (); update_highlights (); - selection_changed (); - } }