fit range decimal precision handling of PMsrHandler improved (MUSR-150 request). musredit keeps now it last open directory

This commit is contained in:
nemu
2010-10-14 19:52:20 +00:00
parent cc3106ff5e
commit 99c1e8d17e
5 changed files with 55 additions and 3 deletions

View File

@@ -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());
}

View File

@@ -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;