]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2169 Segmentation fault when drawing sketch line with undocked property panel
authornds <nds@opencascade.com>
Tue, 23 May 2017 09:23:47 +0000 (12:23 +0300)
committernds <nds@opencascade.com>
Tue, 23 May 2017 09:23:47 +0000 (12:23 +0300)
debug iformation

src/XGUI/XGUI_PropertyPanel.cpp

index a26f7eab07d03d4934d8ee5a8f1c6e6c4263912e..be453d93c502db76f62425deb4b2e12d159884d9 100755 (executable)
@@ -42,6 +42,8 @@
 
 //#define DEBUG_TAB_WIDGETS
 
+//#define DEBUG_ACTIVE_WIDGET
+
 XGUI_PropertyPanel::XGUI_PropertyPanel(QWidget* theParent, XGUI_OperationMgr* theMgr)
     : ModuleBase_IPropertyPanel(theParent),
     myActiveWidget(NULL),
@@ -128,6 +130,9 @@ void XGUI_PropertyPanel::cleanContent()
   myWidgets.clear();
   myPanelPage->clearPage();
   myActiveWidget = NULL;
+#ifdef DEBUG_ACTIVE_WIDGET
+  std::cout << "myActiveWidget = NULL" << std::endl;
+#endif
 
   findButton(PROP_PANEL_PREVIEW)->setVisible(false); /// by default it is hidden
   setWindowTitle(tr("Property Panel"));
@@ -204,6 +209,9 @@ void XGUI_PropertyPanel::activateNextWidget(ModuleBase_ModelWidget* theWidget)
 
 void XGUI_PropertyPanel::onFocusInWidget(ModuleBase_ModelWidget* theWidget)
 {
+#ifdef DEBUG_ACTIVE_WIDGET
+  std::cout << "onFocusInWidget" << std::endl;
+#endif
   if (theWidget->canAcceptFocus())
     activateWidget(theWidget);
 }
@@ -444,6 +452,9 @@ bool XGUI_PropertyPanel::setActiveWidget(ModuleBase_ModelWidget* theWidget)
     theWidget->activate();
   }
   myActiveWidget = theWidget;
+#ifdef DEBUG_ACTIVE_WIDGET
+  std::cout << "myActiveWidget = " << (theWidget ? theWidget->context().c_str() : "") << std::endl;
+#endif
   static Events_ID anEvent = Events_Loop::eventByName(EVENT_UPDATE_BY_WIDGET_SELECTION);
   Events_Loop::loop()->flush(anEvent);