Correct name in list of windows.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-07-18 15:50:34 +03:00
parent 4aa690d55d
commit b318bc1ead

View File

@ -50,6 +50,8 @@ TMainWindow::TMainWindow(QWidget *parent)
ui->tabWidget->setVisible(false); ui->tabWidget->setVisible(false);
SetupMenu(); SetupMenu();
setWindowTitle(tr("untitled"));
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
@ -213,7 +215,15 @@ void TMainWindow::AboutToShowWindowMenu()
for (int i = 0; i < windows.count(); ++i) for (int i = 0; i < windows.count(); ++i)
{ {
TMainWindow *window = windows.at(i); TMainWindow *window = windows.at(i);
QAction *action = ui->menuWindow->addAction(window->windowTitle(), this, SLOT(ShowWindow()));
QString title = window->windowTitle();
const int index = title.lastIndexOf("[*]");
if (index != -1)
{
title.replace(index, 3, "*");
}
QAction *action = ui->menuWindow->addAction(title, this, SLOT(ShowWindow()));
action->setData(i); action->setData(i);
action->setCheckable(true); action->setCheckable(true);
if (window == this) if (window == this)