Skip to content
Permalink
Browse files

add map by double click

git-svn-id: http://svn.osgeo.org/qgis/trunk@4977 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek
rblazek committed Mar 6, 2006
1 parent ec9c93a commit 22a67d0497c55e1596f94dfaaf6224a9c81ed6e5
Showing with 15 additions and 0 deletions.
  1. +12 −0 src/plugins/grass/qgsgrassbrowser.cpp
  2. +3 −0 src/plugins/grass/qgsgrassbrowser.h
@@ -108,6 +108,9 @@ QgsGrassBrowser::QgsGrassBrowser ( QgisIface *iface,
connect ( mTree->selectionModel(),
SIGNAL(currentChanged(QModelIndex,QModelIndex)),
this, SLOT(currentChanged(QModelIndex,QModelIndex)) );

connect ( mTree, SIGNAL(doubleClicked(QModelIndex)),
this, SLOT(doubleClicked(QModelIndex)) );
}

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

void QgsGrassBrowser::doubleClicked(const QModelIndex & index)
{
#ifdef QGISDEBUG
std::cerr << "QgsGrassBrowser::doubleClicked()" << std::endl;
#endif

addMap();
}

void QgsGrassBrowser::deleteMap()
{
#ifdef QGISDEBUG
@@ -54,6 +54,9 @@ public slots:
void selectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
void currentChanged(const QModelIndex & current, const QModelIndex & previous);

// Double click
void doubleClicked(const QModelIndex & index);

private:
QgisIface *mIface;

0 comments on commit 22a67d0

Please sign in to comment.
You can’t perform that action at this time.