Mercurial > hg > orthanc-stone
comparison Framework/Deprecated/Viewport/WidgetViewport.cpp @ 1069:5d1b0d2f4b15 broker
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 15 Oct 2019 21:11:09 +0200 |
parents | e146743f6cdc |
children | 1a73f852810a |
comparison
equal
deleted
inserted
replaced
1068:04a95ee91327 | 1069:5d1b0d2f4b15 |
---|---|
54 centralWidget_->SetStatusBar(statusBar); | 54 centralWidget_->SetStatusBar(statusBar); |
55 } | 55 } |
56 } | 56 } |
57 | 57 |
58 | 58 |
59 IWidget& WidgetViewport::SetCentralWidget(IWidget* widget) | 59 void WidgetViewport::SetCentralWidget(boost::shared_ptr<IWidget> widget) |
60 { | 60 { |
61 if (widget == NULL) | 61 if (widget == NULL) |
62 { | 62 { |
63 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); | 63 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); |
64 } | 64 } |
65 | 65 |
66 mouseTracker_.reset(NULL); | 66 mouseTracker_.reset(NULL); |
67 | 67 |
68 centralWidget_.reset(widget); | 68 centralWidget_ = widget; |
69 centralWidget_->SetViewport(*this); | 69 centralWidget_->SetViewport(*this); |
70 | 70 |
71 if (statusBar_ != NULL) | 71 if (statusBar_ != NULL) |
72 { | 72 { |
73 centralWidget_->SetStatusBar(*statusBar_); | 73 centralWidget_->SetStatusBar(*statusBar_); |
74 } | 74 } |
75 | 75 |
76 NotifyBackgroundChanged(); | 76 NotifyBackgroundChanged(); |
77 | |
78 return *widget; | |
79 } | 77 } |
80 | 78 |
81 | 79 |
82 void WidgetViewport::NotifyBackgroundChanged() | 80 void WidgetViewport::NotifyBackgroundChanged() |
83 { | 81 { |