From 8edf78747ed02b479206c21c4fa3931343354748 Mon Sep 17 00:00:00 2001 From: "eduardo.davila@creatis.insa-lyon.fr" Date: Mon, 20 Jan 2025 17:57:42 +0100 Subject: [PATCH] #3397 Bug Windows. Sync in creation process --- kernel/appli/bbi/bbi.cxx | 6 ++---- kernel/src/bbtkBlackBox.cxx | 20 ++++---------------- kernel/src/bbtkWxBlackBox.cxx | 11 +---------- packages/vtk/src/bbvtkUpdateRender.cxx | 2 +- 4 files changed, 8 insertions(+), 31 deletions(-) diff --git a/kernel/appli/bbi/bbi.cxx b/kernel/appli/bbi/bbi.cxx index 2402646..388fb27 100644 --- a/kernel/appli/bbi/bbi.cxx +++ b/kernel/appli/bbi/bbi.cxx @@ -234,14 +234,14 @@ bool wxBBIApp::OnInit( ) if (cmd.text_dialog) I->SetDialogMode(bbtk::VirtualExec::TextDialog); std::vector::const_iterator i; bool error = false; - printf("EED wxApp::OnInit --start\n"); + //EED 2025-01-20 Create sync mechanism windows bbtk::BlackBox::bbGlobalSetInConstruction(true); for (i=cmd.input_file.begin(); i!=cmd.input_file.end(); ++i) { error = ! I->InterpretFile(*i); if (error) break; } - printf("EED wxApp::OnInit --end\n"); + //EED 2025-01-20 Create sync mechanism windows bbtk::BlackBox::bbGlobalSetInConstruction(false); bool show_on_error = error && ! cmd.no_console; if (show_on_error) I->Show(); @@ -251,8 +251,6 @@ bool wxBBIApp::OnInit( ) std::string package; I->GetInterpreter()->GetExecuter()->GetFactory()->PrintHelpDescriptor("workspace",package,false); } - - /* std::cout << "soe="<second->GetStatus()==UPTODATE) // { i->second->SignalChange(GetThisPointer(),i->first); @@ -589,9 +584,7 @@ namespace bbtk bbGlobalProcessExecutionList(); } // if reaction // } - - } // if inConstruction - + } // if bbGlobalGetInConstruction() bbtkBlackBoxDebugMessage("change",5, "<= BlackBox::bbSignalOutputModification(" <0) return true; return false; } @@ -1551,11 +1542,8 @@ void BlackBox::bbGlobalSetInConstruction(bool b) } else { bbmgInConstruction--; } - printf("BlackBox::bbGlobalSetInConstruction ----- bbmgInConstruction=%d\n", bbmgInConstruction ); -// bbmgInConstruction = b; } - } // EO namespace bbtk // EOF diff --git a/kernel/src/bbtkWxBlackBox.cxx b/kernel/src/bbtkWxBlackBox.cxx index f499f74..ffe21f5 100644 --- a/kernel/src/bbtkWxBlackBox.cxx +++ b/kernel/src/bbtkWxBlackBox.cxx @@ -305,11 +305,7 @@ printf("EED WxFrame::~WxFrame\n"); wxSize( bbGetInputWinWidth() , bbGetInputWinHeight() ) ); w->SetFocus(); // focus on my window - w->Raise(); // bring window to front - - printf("EED WxBlackBox::bbCreateFrameWindow --------------\n"); -// w->Enable(false); - + w->Raise(); // bring window to front w->Show(true); } @@ -337,13 +333,8 @@ printf("EED WxFrame::~WxFrame\n"); { ((WxDialog*)bbmWindow)->ShowModal(); } else { - printf("//EED -------------- WxBlackBox::bbShowWindow 1 ------------------------ \n"); bbGetWindow()->Show(); bbSetShown(true); - - printf("//EED -------------- WxBlackBox::bbShowWindow 2 ------------------------ \n"); -// bbmWindow->Enable(true); - } // if Dialog } // if Window shown } diff --git a/packages/vtk/src/bbvtkUpdateRender.cxx b/packages/vtk/src/bbvtkUpdateRender.cxx index 20552dd..160fd52 100644 --- a/packages/vtk/src/bbvtkUpdateRender.cxx +++ b/packages/vtk/src/bbvtkUpdateRender.cxx @@ -39,7 +39,7 @@ void UpdateRender::Process() { if (bbGetInputRenderer()!=NULL) { -printf("EED UpdateRender::Process UPS\n "); +//EED 2025-01-20 Create sync mechanism windows // bbGetInputRenderer()->GetRenderWindow()->Render(); bbGetInputRenderer()->GetRenderWindow()->GetInteractor()->Render(); } // Renderer -- 2.49.0