diff Framework/Radiography/RadiographyWidget.cpp @ 1220:9ee6b28f53e8

RadiographyTextLayer: support multiple fonts
author Alain Mazy <alain@mazy.be>
date Sat, 07 Dec 2019 17:47:23 +0100
parents 922d2e61aa5d
children 37bc7f115f81 c14fde4a595c
line wrap: on
line diff
--- a/Framework/Radiography/RadiographyWidget.cpp	Sat Dec 07 17:46:25 2019 +0100
+++ b/Framework/Radiography/RadiographyWidget.cpp	Sat Dec 07 17:47:23 2019 +0100
@@ -169,6 +169,7 @@
                                        const std::string& name) :
     WorldSceneWidget(name),
     IObserver(broker),
+    IObservable(broker),
     invert_(false),
     interpolation_(ImageInterpolation_Nearest),
     hasSelection_(false),
@@ -182,6 +183,15 @@
   {
     hasSelection_ = true;
     selectedLayer_ = layer;
+
+    NotifyContentChanged();
+    BroadcastMessage(SelectionChangedMessage(*this));
+  }
+
+  void RadiographyWidget::Unselect()
+  {
+    hasSelection_ = false;
+    BroadcastMessage(SelectionChangedMessage(*this));
   }
 
   bool RadiographyWidget::LookupSelectedLayer(size_t& layer)