Skip to content

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed
 

‎src/plugins/grass/qgsgrasstools.cpp

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,13 @@ QgsGrassTools::QgsGrassTools ( QgisApp *qgisApp, QgisIface *iface,
132132
//QString conf = QgsApplication::pkgDataPath() + "/grass/config/default.qgc";
133133
QString conf = mAppDir + "/share/qgis/grass/config/default.qgc";
134134

135+
restorePosition();
136+
137+
// Show before loadConfig() so that user can see loading
138+
mModulesListView->show();
139+
135140
loadConfig ( conf );
136141
//statusBar()->hide();
137-
restorePosition();
138142
}
139143

140144
void QgsGrassTools::moduleClicked( Q3ListViewItem * item )
@@ -159,12 +163,24 @@ void QgsGrassTools::moduleClicked( Q3ListViewItem * item )
159163
if ( name == "shell" )
160164
{
161165
#ifdef WIN32
162-
QMessageBox::warning( 0, "Warning",
163-
"GRASS Shell is not supported on Windows." );
164-
165-
// This does not work:
166-
//QProcess *proc = new QProcess();
167-
//proc->start ("cmd.exe");
166+
// Run MSYS if available
167+
// Note: I was not able to run cmd.exe and command.com
168+
// with QProcess
169+
170+
QString msysPath = mAppDir + "/msys/msys.bat";
171+
QFile file ( msysPath );
172+
173+
if ( !file.exists() )
174+
{
175+
QMessageBox::warning( 0, "Warning",
176+
"Cannot find MSYS (" + msysPath + ")" );
177+
}
178+
else
179+
{
180+
QProcess *proc = new QProcess(this);
181+
proc->start (msysPath);
182+
}
183+
return;
168184
#else
169185

170186
#ifdef HAVE_OPENPTY

0 commit comments

Comments
 (0)
Please sign in to comment.