Correct name in list of windows.
--HG-- branch : feature
This commit is contained in:
parent
4aa690d55d
commit
b318bc1ead
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user