summaryrefslogtreecommitdiffstats
path: root/src/gui/WindowFactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/WindowFactory.cpp')
-rw-r--r--src/gui/WindowFactory.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/gui/WindowFactory.cpp b/src/gui/WindowFactory.cpp
index 4e48f157..010ef704 100644
--- a/src/gui/WindowFactory.cpp
+++ b/src/gui/WindowFactory.cpp
@@ -14,9 +14,10 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "WindowFactory.hpp"
+
#include "App.hpp"
#include "GraphBox.hpp"
-#include "GraphView.hpp"
#include "GraphWindow.hpp"
#include "LoadGraphWindow.hpp"
#include "LoadPluginWindow.hpp"
@@ -24,12 +25,12 @@
#include "PropertiesWindow.hpp"
#include "RenameWindow.hpp"
#include "WidgetFactory.hpp"
-#include "WindowFactory.hpp"
#include "ingen/Log.hpp"
#include "ingen/client/BlockModel.hpp"
#include "ingen/client/GraphModel.hpp"
#include "ingen/client/ObjectModel.hpp"
+#include "raul/Path.hpp"
#include <gdkmm/window.h>
#include <glibmm/signalproxy.h>
@@ -52,11 +53,6 @@ namespace gui {
WindowFactory::WindowFactory(App& app)
: _app(app)
- , _main_box(nullptr)
- , _load_plugin_win(nullptr)
- , _load_graph_win(nullptr)
- , _new_subgraph_win(nullptr)
- , _properties_win(nullptr)
{
WidgetFactory::get_widget_derived("load_plugin_win", _load_plugin_win);
WidgetFactory::get_widget_derived("load_graph_win", _load_graph_win);
@@ -114,9 +110,9 @@ WindowFactory::graph_box(const std::shared_ptr<const GraphModel>& graph)
GraphWindow* window = graph_window(graph);
if (window) {
return window->box();
- } else {
- return _main_box;
}
+
+ return _main_box;
}
GraphWindow*
@@ -153,8 +149,6 @@ WindowFactory::present_graph(const std::shared_ptr<const GraphModel>& graph,
GraphWindow* preferred,
const std::shared_ptr<GraphView>& view)
{
- assert(!view || view->graph() == graph);
-
auto w = _graph_windows.find(graph->path());
if (w != _graph_windows.end()) {
@@ -178,8 +172,6 @@ GraphWindow*
WindowFactory::new_graph_window(const std::shared_ptr<const GraphModel>& graph,
const std::shared_ptr<GraphView>& view)
{
- assert(!view || view->graph() == graph);
-
GraphWindow* win = nullptr;
WidgetFactory::get_widget_derived("graph_win", win);
if (!win) {