@@ -25,6 +25,7 @@ void VEditTab::focusTab()
{
focusChild();
emit getFocused();
+ updateStatus();
}
bool VEditTab::isEditMode() const
@@ -49,8 +50,10 @@ void VEditTab::handleFocusChanged(QWidget * /* p_old */, QWidget *p_now)
} else if (isAncestorOf(p_now)) {
@@ -265,8 +265,8 @@ int VEditWindow::insertEditTab(int p_index, VFile *p_file, QWidget *p_page)
int idx = insertTab(p_index,
p_page,
- generateTabText(p_index, p_file));
- setTabToolTip(idx, generateTooltip(p_file));
+ p_file->getName());
+ updateTabInfo(idx);
return idx;
@@ -153,6 +153,7 @@ private:
// and move the tab to the new split.
void moveTabOneSplit(int p_tabIdx, bool p_right);
+ // Update info of tab @p_idx according to the state of the editor and file.
void updateTabInfo(int p_idx);
// Update the sequence number of all the tabs.
@@ -1155,7 +1155,7 @@ void VMainWindow::initEditMenu()
void VMainWindow::initDockWindows()
toolDock = new QDockWidget(tr("Tools"), this);
- toolDock->setObjectName("tools_dock");
+ toolDock->setObjectName("ToolsDock");
toolDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
toolBox = new QToolBox(this);