Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
15cbbe2c
Commit
15cbbe2c
authored
Mar 23, 2012
by
Bryant Mairs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Canceling out of file selection in the logfile plotter no longer triggers a warning.
parent
dd011bc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
QGCDataPlot2D.cc
src/ui/QGCDataPlot2D.cc
+17
-9
No files found.
src/ui/QGCDataPlot2D.cc
View file @
15cbbe2c
...
...
@@ -246,21 +246,27 @@ void QGCDataPlot2D::exportSVG(QString fileName)
*/
void
QGCDataPlot2D
::
selectFile
()
{
// Let user select the log file name
//QDate date(QDate::currentDate());
// QString("./pixhawk-log-" + date.toString("yyyy-MM-dd") + "-" + QString::number(logindex) + ".log")
// Open a file dialog prompting the user for the file to load.
// Note the special case for the Pixhawk.
if
(
ui
->
inputFileType
->
currentText
().
contains
(
"pxIMU"
)
||
ui
->
inputFileType
->
currentText
().
contains
(
"RAW"
))
{
fileName
=
QFileDialog
::
getOpenFileName
(
this
,
tr
(
"Specify log file name"
),
QString
(),
"Logfile (*.imu *.raw)"
);
}
else
{
}
else
{
fileName
=
QFileDialog
::
getOpenFileName
(
this
,
tr
(
"Specify log file name"
),
QString
(),
"Logfile (*.csv *.txt *.log)"
);
}
// Store reference to file
// Check if the user hit cancel, which results in a Null string.
// If this is the case, we just stop.
if
(
fileName
.
isNull
())
{
return
;
}
// Now attempt to open the file
QFileInfo
fileInfo
(
fileName
);
if
(
!
fileInfo
.
isReadable
())
{
if
(
!
fileInfo
.
isReadable
())
{
QMessageBox
msgBox
;
msgBox
.
setIcon
(
QMessageBox
::
Critical
);
msgBox
.
setText
(
"Could not open file"
);
...
...
@@ -269,7 +275,9 @@ void QGCDataPlot2D::selectFile()
msgBox
.
setDefaultButton
(
QMessageBox
::
Ok
);
msgBox
.
exec
();
ui
->
filenameLabel
->
setText
(
tr
(
"Could not open %1"
).
arg
(
fileInfo
.
baseName
()
+
"."
+
fileInfo
.
completeSuffix
()));
}
else
{
}
else
{
ui
->
filenameLabel
->
setText
(
tr
(
"Opened %1"
).
arg
(
fileInfo
.
completeBaseName
()
+
"."
+
fileInfo
.
completeSuffix
()));
// Open and import the file
loadFile
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment