work towards group editor
This commit is contained in:
@@ -220,11 +220,6 @@ void MainWindow::FolderOpen(Project* p, Folder *i, bool floating)
|
||||
{
|
||||
ProjectPanel* panel = PanelManager::instance()->CreatePanel<ProjectPanel>(this);
|
||||
|
||||
// Set custom name to distinguish it from regular ProjectPanels
|
||||
panel->setObjectName(QStringLiteral("FolderPanel"));
|
||||
|
||||
SetUniquePanelID<ProjectPanel>(panel, folder_panels_);
|
||||
|
||||
panel->set_project(p);
|
||||
panel->set_root(i);
|
||||
|
||||
@@ -823,8 +818,6 @@ T *MainWindow::AppendPanelInternal(QList<T*>& list)
|
||||
{
|
||||
T* panel = PanelManager::instance()->CreatePanel<T>(this);
|
||||
|
||||
SetUniquePanelID(panel, list);
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
tabifyDockWidget(list.last(), panel);
|
||||
}
|
||||
@@ -841,20 +834,11 @@ T *MainWindow::AppendPanelInternal(QList<T*>& list)
|
||||
return panel;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void MainWindow::SetUniquePanelID(T *panel, const QList<T *> &list)
|
||||
{
|
||||
// Set unique object name so it can be identified by QMainWindow's save and restore state functions
|
||||
panel->setObjectName(panel->objectName().append(QString::number(list.size())));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T *MainWindow::AppendFloatingPanelInternal(QList<T *> &list)
|
||||
{
|
||||
T* panel = PanelManager::instance()->CreatePanel<T>(this);
|
||||
|
||||
SetUniquePanelID(panel, list);
|
||||
|
||||
panel->setFloating(true);
|
||||
panel->show();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user