forked from len0rd/rockbox
qeditor: rework mainwindow tab names handling
With the previous code, tab names would be ignored if tab is detached which can happen early on. Change-Id: I9eac4202850f3e79a04590a4ba1444850ec6a583 Reviewed-on: http://gerrit.rockbox.org/986 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
This commit is contained in:
parent
fe1fed8873
commit
3b4e63173d
4 changed files with 20 additions and 7 deletions
|
|
@ -961,6 +961,7 @@ RegEdit::RegEdit(Backend *backend, QWidget *parent)
|
|||
SetModified(false, false);
|
||||
m_right_panel = 0;
|
||||
SetPanel(new EmptyEditPanel(this));
|
||||
UpdateTabName();
|
||||
|
||||
connect(m_file_open, SIGNAL(clicked()), this, SLOT(OnOpen()));
|
||||
connect(m_file_save, SIGNAL(clicked()), this, SLOT(OnSave()));
|
||||
|
|
@ -1080,7 +1081,10 @@ bool RegEdit::SaveSocFile(const QString& filename)
|
|||
void RegEdit::UpdateTabName()
|
||||
{
|
||||
QFileInfo info(m_cur_socfile.GetFilename());
|
||||
SetTabName(info.fileName());
|
||||
if(info.exists())
|
||||
SetTabName(info.fileName());
|
||||
else
|
||||
SetTabName("Register Editor");
|
||||
}
|
||||
|
||||
void RegEdit::LoadSocFile(const QString& filename)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue