From c3febf3560408e4c673fed53c7d4cdecdb505984 Mon Sep 17 00:00:00 2001 From: Andre Bernet Date: Sun, 5 Mar 2017 10:37:18 +0100 Subject: [PATCH] [companion] Default category on new file was added at the wrong place and also created when reading form radio --- companion/src/mainwindow.cpp | 4 ++++ companion/src/mdichild.cpp | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/companion/src/mainwindow.cpp b/companion/src/mainwindow.cpp index 4579d342a..ceb3ce158 100644 --- a/companion/src/mainwindow.cpp +++ b/companion/src/mainwindow.cpp @@ -543,6 +543,10 @@ void MainWindow::newFile() { MdiChild * child = createMdiChild(); child->newFile(); + + if (IS_HORUS(getCurrentBoard())) { + child->categoryAdd(); + } child->show(); } diff --git a/companion/src/mdichild.cpp b/companion/src/mdichild.cpp index dd681bbf1..8b8eb00f1 100644 --- a/companion/src/mdichild.cpp +++ b/companion/src/mdichild.cpp @@ -597,10 +597,6 @@ void MdiChild::newFile() isUntitled = true; curFile = QString("document%1.otx").arg(sequenceNumber++); updateTitle(); - - if (IS_HORUS(getCurrentBoard())) { - categoryAdd(); - } } bool MdiChild::loadFile(const QString & filename, bool resetCurrentFile)