Skip to content

Commit 021fa3e

Browse files
author
rblazek
committedFeb 14, 2006
new vector
git-svn-id: http://svn.osgeo.org/qgis/trunk@4842 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent f97428e commit 021fa3e

File tree

1 file changed

+34
-32
lines changed

1 file changed

+34
-32
lines changed
 

‎src/plugins/grass/qgsgrassedit.cpp

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,38 @@ QgsGrassEdit::QgsGrassEdit ( QgisApp *qgisApp, QgisIface *iface,
122122
//TODO dynamic_cast ?
123123
mProvider = (QgsGrassProvider *) vector->getDataProvider();
124124

125+
init();
126+
127+
}
128+
129+
QgsGrassEdit::QgsGrassEdit ( QgisApp *qgisApp, QgisIface *iface,
130+
QgsGrassProvider *provider,
131+
QWidget * parent, Qt::WFlags f )
132+
:QMainWindow(parent, 0, f), QgsGrassEditBase ()
133+
{
134+
#ifdef QGISDEBUG
135+
std::cerr << "QgsGrassEdit()" << std::endl;
136+
#endif
137+
138+
setupUi(this);
139+
140+
mRunning = true;
141+
mValid = false;
142+
mTool = QgsGrassEdit::NONE;
143+
mSuspend = false;
144+
mQgisApp = qgisApp;
145+
mIface = iface;
146+
mNewMap = true;
147+
148+
mCanvas = mIface->getMapCanvas();
149+
150+
mProvider = provider;
151+
152+
init();
153+
}
154+
155+
void QgsGrassEdit::init()
156+
{
125157
QString myIconPath = QgsApplication::themePath() + "/grass/";
126158

127159
QActionGroup *ag = new QActionGroup ( this );
@@ -221,38 +253,6 @@ QgsGrassEdit::QgsGrassEdit ( QgisApp *qgisApp, QgisIface *iface,
221253
tb->addAction ( mCloseEditAction );
222254
connect ( mCloseEditAction, SIGNAL(triggered()), this, SLOT(closeEdit()) );
223255

224-
init();
225-
226-
mNewPointAction->setOn(true);
227-
startTool(QgsGrassEdit::NEW_POINT);
228-
}
229-
230-
QgsGrassEdit::QgsGrassEdit ( QgisApp *qgisApp, QgisIface *iface,
231-
QgsGrassProvider *provider,
232-
QWidget * parent, Qt::WFlags f )
233-
:QMainWindow(parent, 0, f), QgsGrassEditBase ()
234-
{
235-
#ifdef QGISDEBUG
236-
std::cerr << "QgsGrassEdit()" << std::endl;
237-
#endif
238-
239-
mRunning = true;
240-
mValid = false;
241-
mTool = QgsGrassEdit::NONE;
242-
mSuspend = false;
243-
mQgisApp = qgisApp;
244-
mIface = iface;
245-
mNewMap = true;
246-
247-
mCanvas = mIface->getMapCanvas();
248-
249-
mProvider = provider;
250-
251-
init();
252-
}
253-
254-
void QgsGrassEdit::init()
255-
{
256256
if ( !(mProvider->isGrassEditable()) ) {
257257
QMessageBox::warning( 0, "Warning", "You are not owner of the mapset, "
258258
"cannot open the vector for editing." );
@@ -453,6 +453,8 @@ void QgsGrassEdit::init()
453453

454454
// TODO: how to get keyboard events from canvas (shortcuts)
455455

456+
mNewPointAction->setOn(true); // Start NEW_POINT tool
457+
456458
restorePosition();
457459

458460
mValid = true;

0 commit comments

Comments
 (0)
Please sign in to comment.