Cosmetics
This commit is contained in:
@@ -673,23 +673,23 @@ void MainWindow::saveAs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::openRecentFile()
|
void MainWindow::openRecentFile()
|
||||||
{
|
{
|
||||||
QAction *action = qobject_cast<QAction *>(sender());
|
QAction *action = qobject_cast<QAction *>(sender());
|
||||||
if (action) {
|
if (action) {
|
||||||
QString fileName=action->data().toString();
|
QString fileName = action->data().toString();
|
||||||
|
|
||||||
QMdiSubWindow *existing = findMdiChild(fileName);
|
|
||||||
if (existing) {
|
|
||||||
mdiArea->setActiveSubWindow(existing);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
QMdiSubWindow *existing = findMdiChild(fileName);
|
||||||
|
if (existing) {
|
||||||
|
mdiArea->setActiveSubWindow(existing);
|
||||||
|
}
|
||||||
|
else {
|
||||||
MdiChild *child = createMdiChild();
|
MdiChild *child = createMdiChild();
|
||||||
if (child->loadFile(fileName)) {
|
if (child->loadFile(fileName)) {
|
||||||
statusBar()->showMessage(tr("File loaded"), 2000);
|
statusBar()->showMessage(tr("File loaded"), 2000);
|
||||||
child->show();
|
child->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::loadProfile() //TODO Load all variables - Also HW!
|
void MainWindow::loadProfile() //TODO Load all variables - Also HW!
|
||||||
|
|||||||
Reference in New Issue
Block a user