File tree 2 files changed +4
-8
lines changed
2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -65,14 +65,14 @@ FileEvent *Computer::browseOpen(const QString &path)
65
65
FileEvent *Computer::browseSave (const QString &path, FileEvent::FileMode mode)
66
66
{
67
67
QString caption = tr (" Save" );
68
- QString filter = tr (" JASP Files" ) += " (*.jasp)" ;
68
+ QString filter = tr (" JASP Files" ) + " (*.jasp)" ;
69
69
70
70
QString browsePath = path;
71
71
if (path == " " )
72
72
browsePath = _computerListModel->getMostRecent ();
73
73
74
- if (_hasFileName )
75
- browsePath += QDir::separator () + _fileName;
74
+ if (!_fileName. isEmpty () )
75
+ browsePath += QDir::separator () + _fileName + " .jasp " ;
76
76
77
77
switch (mode)
78
78
{
@@ -138,13 +138,11 @@ void Computer::analysesExportResults()
138
138
void Computer::setFileName (const QString &filename)
139
139
{
140
140
_fileName = filename;
141
- _hasFileName = true ;
142
141
}
143
142
144
143
void Computer::clearFileName ()
145
144
{
146
145
_fileName = " " ;
147
- _hasFileName = false ;
148
146
}
149
147
150
148
void Computer::browsePath (QString path)
Original file line number Diff line number Diff line change @@ -53,9 +53,7 @@ public slots:
53
53
void browseSaveSignal (const QString & path = " " , FileEvent::FileMode mode = FileEvent::FileSave);
54
54
55
55
private:
56
- // these two variables are a hack!
57
- bool _hasFileName;
58
- QString _fileName;
56
+ QString _fileName; // /< Used to show right filename in save-as JASP file dialog
59
57
60
58
ComputerListModel *_computerListModel = nullptr ;
61
59
};
You can’t perform that action at this time.
0 commit comments