mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
bug-fix: update status after edit tab got focus
This commit is contained in:
parent
00feaa13e2
commit
5aa5864ced
@ -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)
|
||||
focusChild();
|
||||
|
||||
emit getFocused();
|
||||
updateStatus();
|
||||
} else if (isAncestorOf(p_now)) {
|
||||
emit getFocused();
|
||||
updateStatus();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user