fit range decimal precision handling of PMsrHandler improved (MUSR-150 request). musredit keeps now it last open directory
This commit is contained in:
@@ -133,6 +133,8 @@ PTextEdit::PTextEdit( QWidget *parent, Qt::WindowFlags f )
|
||||
}
|
||||
|
||||
connect( fTabWidget, SIGNAL( currentChanged(QWidget*) ), this, SLOT( applyFontSettings(QWidget*) ));
|
||||
|
||||
fLastDirInUse = fAdmin->getDefaultSavePath();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
@@ -822,7 +824,7 @@ void PTextEdit::fileNew()
|
||||
void PTextEdit::fileOpen()
|
||||
{
|
||||
QStringList flns = QFileDialog::getOpenFileNames( this, tr("Open msr-/mlog-File"),
|
||||
fAdmin->getDefaultSavePath(),
|
||||
fLastDirInUse,
|
||||
tr( "msr-Files (*.msr);;msr-Files (*.msr *.mlog);;All Files (*)" ));
|
||||
|
||||
QStringList::Iterator it = flns.begin();
|
||||
@@ -830,6 +832,12 @@ void PTextEdit::fileOpen()
|
||||
QString tabFln;
|
||||
bool alreadyOpen = false;
|
||||
|
||||
// if flns are present, keep the corresponding directory
|
||||
if (flns.size() > 0) {
|
||||
finfo1.setFile(flns.at(0));
|
||||
fLastDirInUse = finfo1.absoluteFilePath();
|
||||
}
|
||||
|
||||
while( it != flns.end() ) {
|
||||
// check if the file is not already open
|
||||
finfo1.setFile(*it);
|
||||
@@ -2046,6 +2054,8 @@ void PTextEdit::musrView()
|
||||
str = *fFilenames.find( currentEditor() );
|
||||
cmd += str + "\" &";
|
||||
|
||||
qDebug() << endl << cmd << endl;
|
||||
|
||||
system(cmd.toLatin1());
|
||||
}
|
||||
|
||||
|
||||
@@ -146,6 +146,7 @@ private:
|
||||
QFileSystemWatcher *fFileSystemWatcher; ///< checks if msr-files are changing on the disk while being open in musredit.
|
||||
bool fFileSystemWatcherActive; ///< flag to enable/disable the file system watcher
|
||||
QTimer fFileSystemWatcherTimeout; ///< timer used to re-enable file system watcher. Needed to delay the re-enabling
|
||||
QString fLastDirInUse; ///< string holding the path from where the last file was loaded.
|
||||
|
||||
QAction *fMusrT0Action;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user