Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vizkit bugfixes #48

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/vizkit/cplusplus_extensions/vizkit_widget.rb
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,7 @@ def push_transformer_configuration(data)
def listen_to_transformation_producer(trsf)
return if @connected_transformation_producers.has_key?(trsf.producer)

task, *port = trsf.producer.split('.')
port = port.join(".")
task, _, port = trsf.producer.rpartition('.')
Vizkit.debug "connecting producer task #{task}, port #{port} for #{trsf.from} => #{trsf.to}"
producer_name = task.gsub(/.*\//, '')
Vizkit.connect_port_to producer_name, port do |data, port_name|
Expand Down
17 changes: 10 additions & 7 deletions lib/vizkit/widgets/task_inspector/task_inspector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,18 @@ def self.create_widget(parent = nil)

#populate widget menu
Vizkit.default_loader.plugin_specs.keys.sort.each do |name|
# do not add qt base widgets
next if name[0] == "Q" && Qt.const_defined?(name[1..-1])
action = form.menuWidgets.addAction(name)
action.connect SIGNAL("triggered()") do
w = Vizkit.default_loader.create_plugin name
w.show if w.respond_to?(:show) || w.kind_of?(Qt::Widget)
begin
# do not add qt base widgets
next if name[0] == "Q" && Qt.const_defined?(name[1..-1])
action = form.menuWidgets.addAction(name)
action.connect SIGNAL("triggered()") do
w = Vizkit.default_loader.create_plugin name
w.show if w.respond_to?(:show) || w.kind_of?(Qt::Widget)
end
rescue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where exactly does the error occur in this block?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using QwtThermo widget. But it's always searching for wtThermo widget and crashed when trying to add it

Vizkit.warn "#{name} widget could not been added"
end
end

form
end

Expand Down