summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/XMLConsoleController.cpp')
-rw-r--r--Swift/Controllers/XMLConsoleController.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Swift/Controllers/XMLConsoleController.cpp b/Swift/Controllers/XMLConsoleController.cpp
index 8bd79ed..810e8a6 100644
--- a/Swift/Controllers/XMLConsoleController.cpp
+++ b/Swift/Controllers/XMLConsoleController.cpp
@@ -9,12 +9,16 @@ XMLConsoleController::XMLConsoleController(UIEventStream* uiEventStream, XMLCons
uiEventStream_ = uiEventStream;
xmlConsoleWidgetFactory_ = xmlConsoleWidgetFactory;
uiEventStream_->onUIEvent.connect(boost::bind(&XMLConsoleController::handleUIEvent, this, _1));
+ xmlConsoleWidget_ = NULL;
}
void XMLConsoleController::handleUIEvent(boost::shared_ptr<UIEvent> rawEvent) {
boost::shared_ptr<RequestXMLConsoleUIEvent> event = boost::dynamic_pointer_cast<RequestXMLConsoleUIEvent>(rawEvent);
if (event != NULL) {
- xmlConsoleWidget_ = xmlConsoleWidgetFactory_->createXMLConsoleWidget();
+ if (xmlConsoleWidget_ == NULL) {
+ xmlConsoleWidget_ = xmlConsoleWidgetFactory_->createXMLConsoleWidget();
+ }
+ xmlConsoleWidget_->show();
}
}