summaryrefslogtreecommitdiffstats
path: root/grapher/GraphWidget.cxx
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-09-16 19:15:21 +0200
committerTim Moore <timoore@redhat.com>2009-09-30 20:40:30 +0200
commit6248dea71308a565d4b7b11384356e1419e9e52d (patch)
tree375c84ab4b311d40a356101ef63fbdf3279a0976 /grapher/GraphWidget.cxx
parentaac88aab720d169bacc49702f18996a5929a7f5d (diff)
downloadsystemtap-steved-6248dea71308a565d4b7b11384356e1419e9e52d.tar.gz
systemtap-steved-6248dea71308a565d4b7b11384356e1419e9e52d.tar.xz
systemtap-steved-6248dea71308a565d4b7b11384356e1419e9e52d.zip
cleanup of graph data dialog
* grapher/GraphWidget.cxx (on_button_release_event, onDataAdd): tweaks for graph data dialog
Diffstat (limited to 'grapher/GraphWidget.cxx')
-rw-r--r--grapher/GraphWidget.cxx19
1 files changed, 16 insertions, 3 deletions
diff --git a/grapher/GraphWidget.cxx b/grapher/GraphWidget.cxx
index aab3c964..d42e1a79 100644
--- a/grapher/GraphWidget.cxx
+++ b/grapher/GraphWidget.cxx
@@ -177,8 +177,12 @@ namespace systemtap
bool GraphWidget::on_button_release_event(GdkEventButton* event)
{
- _activeGraph.reset();
- _trackingDrag = false;
+ // Was data dialog launched?
+ if (event->button != 3)
+ {
+ _activeGraph.reset();
+ _trackingDrag = false;
+ }
return true;
}
@@ -249,6 +253,15 @@ namespace systemtap
void GraphWidget::onDataAdd()
{
+ Glib::RefPtr<Gtk::TreeSelection> treeSelection =
+ _dataTreeView->get_selection();
+ Gtk::TreeModel::iterator iter = treeSelection->get_selected();
+ if (iter)
+ {
+ Gtk::TreeModel::Row row = *iter;
+ shared_ptr<GraphDataBase> data = row[_dataColumns._graphData];
+ _activeGraph->addGraphData(data);
+ }
}
void GraphWidget::onDataRemove()
@@ -257,7 +270,7 @@ namespace systemtap
void GraphWidget::onDataDialogOpen()
{
- _listStore.clear();
+ _listStore->clear();
for (GraphDataList::iterator itr = _graphData.begin(),
end = _graphData.end();
itr != end;