mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-23 14:15:42 +00:00
Update from toolwindowmanager repository @ 755b795
This commit is contained in:
@@ -1524,6 +1524,8 @@ void ToolWindowManager::tabCloseRequested(int index)
|
||||
if(!allowClose(toolWindow))
|
||||
return;
|
||||
|
||||
tabWidget->tabClosing(index);
|
||||
|
||||
if(toolWindowProperties(toolWindow) & ToolWindowManager::HideOnClose)
|
||||
hideToolWindow(toolWindow);
|
||||
else
|
||||
|
||||
@@ -61,7 +61,6 @@ ToolWindowManagerArea::ToolWindowManagerArea(ToolWindowManager *manager, QWidget
|
||||
m_manager->m_areas << this;
|
||||
|
||||
QObject::connect(tabBar(), &QTabBar::tabMoved, this, &ToolWindowManagerArea::tabMoved);
|
||||
QObject::connect(tabBar(), &QTabBar::tabCloseRequested, this, &ToolWindowManagerArea::tabClosing);
|
||||
QObject::connect(tabBar(), &QTabBar::tabCloseRequested, this, &QTabWidget::tabCloseRequested);
|
||||
QObject::connect(this, &QTabWidget::currentChanged, this, &ToolWindowManagerArea::tabSelected);
|
||||
}
|
||||
|
||||
@@ -68,6 +68,11 @@ public:
|
||||
*/
|
||||
void updateToolWindow(QWidget *toolWindow);
|
||||
|
||||
/*!
|
||||
* Callback when a tab is closing, after manager has checked that it is allowed.
|
||||
*/
|
||||
void tabClosing(int index);
|
||||
|
||||
protected:
|
||||
//! Reimplemented from QTabWidget::mouseMoveEvent.
|
||||
virtual void mouseMoveEvent(QMouseEvent *);
|
||||
@@ -116,7 +121,6 @@ private:
|
||||
private slots:
|
||||
void tabMoved(int from, int to);
|
||||
void tabSelected(int index);
|
||||
void tabClosing(int index);
|
||||
};
|
||||
|
||||
#endif // TOOLWINDOWMANAGERAREA_H
|
||||
|
||||
Reference in New Issue
Block a user