소스 검색

Fixed order of notifyStateChanged post example

Ivo Wolf 14 년 전
부모
커밋
a4f662cf5e
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      Plugins/org.commontk.dah.exampleapp/ctkExampleDicomAppLogic.cpp

+ 6 - 2
Plugins/org.commontk.dah.exampleapp/ctkExampleDicomAppLogic.cpp

@@ -96,9 +96,13 @@ void ctkExampleDicomAppLogic::do_something()
 void ctkExampleDicomAppLogic::onStartProgress()
 {
   setInternalState(ctkDicomAppHosting::INPROGRESS);
-  getHostInterface()->notifyStateChanged(ctkDicomAppHosting::INPROGRESS);
 
-  do_something();
+  // we need to create the button before we receive data from
+  // the host, which happens immediately after calling
+  // getHostInterface()->notifyStateChanged
+  do_something(); 
+
+  getHostInterface()->notifyStateChanged(ctkDicomAppHosting::INPROGRESS);
 }
 
 //----------------------------------------------------------------------------