Skip to content

Commit 22a67d0

Browse files
author
rblazek
committedMar 6, 2006
add map by double click
git-svn-id: http://svn.osgeo.org/qgis/trunk@4977 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent ec9c93a commit 22a67d0

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
 

‎src/plugins/grass/qgsgrassbrowser.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ QgsGrassBrowser::QgsGrassBrowser ( QgisIface *iface,
108108
connect ( mTree->selectionModel(),
109109
SIGNAL(currentChanged(QModelIndex,QModelIndex)),
110110
this, SLOT(currentChanged(QModelIndex,QModelIndex)) );
111+
112+
connect ( mTree, SIGNAL(doubleClicked(QModelIndex)),
113+
this, SLOT(doubleClicked(QModelIndex)) );
111114
}
112115

113116
QgsGrassBrowser::~QgsGrassBrowser() { }
@@ -156,6 +159,15 @@ void QgsGrassBrowser::addMap()
156159
}
157160
}
158161

162+
void QgsGrassBrowser::doubleClicked(const QModelIndex & index)
163+
{
164+
#ifdef QGISDEBUG
165+
std::cerr << "QgsGrassBrowser::doubleClicked()" << std::endl;
166+
#endif
167+
168+
addMap();
169+
}
170+
159171
void QgsGrassBrowser::deleteMap()
160172
{
161173
#ifdef QGISDEBUG

‎src/plugins/grass/qgsgrassbrowser.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public slots:
5454
void selectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
5555
void currentChanged(const QModelIndex & current, const QModelIndex & previous);
5656

57+
// Double click
58+
void doubleClicked(const QModelIndex & index);
59+
5760
private:
5861
QgisIface *mIface;
5962

0 commit comments

Comments
 (0)
Please sign in to comment.