Module: Roby::GUI::PlanRebuilderWidget::ContextMenuHandler

Defined in:
lib/roby/gui/plan_rebuilder_widget.rb

Instance Method Summary collapse

Instance Method Details

#mouseReleaseEvent(event) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/roby/gui/plan_rebuilder_widget.rb', line 38

def mouseReleaseEvent(event)
    if event.button == Qt::RightButton
        event.accept

        menu = Qt::Menu.new
        inspect_cycle = menu.add_action("Step-by-step from there")
        if action = menu.exec(event.globalPos)
            cycle_index = currentItem.data(Qt::UserRole).toInt

            rebuilder_widget = self.parentWidget
            stepping = Stepping.new(
                rebuilder_widget,
                rebuilder_widget.current_plan,
                rebuilder_widget.logfile.dup,
                cycle_index)
            stepping.exec
        end
    end
end