From 053c2aaf6db6bc45c25cf542983f712098d77862 Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 6 May 2014 11:53:59 +0400 Subject: [PATCH] refs #30 - Sketch base GUI: create, draw lines Correction for the property panel controls. The repaint() call. Test case: Activate sketch operation, activate line creation, select first point, move it. The property control spin boxes should be updated immediatelly by the mouse move. Without repaint, the controls are updated with a delay. --- src/Events/Events_Error.cpp | 2 +- src/XGUI/XGUI_PropertyPanel.cpp | 2 ++ src/XGUI/XGUI_PropertyPanel.h | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Events/Events_Error.cpp b/src/Events/Events_Error.cpp index ae5d83c37..ff3fd58e8 100644 --- a/src/Events/Events_Error.cpp +++ b/src/Events/Events_Error.cpp @@ -37,5 +37,5 @@ void Events_Error::send(char* theDescription, const void* theSender) void Events_Error::send(std::string theDescription, const void* theSender) { - Events_Error::send(theDescription.c_str(), theSender); + Events_Error::send((char*)theDescription.c_str(), theSender); } diff --git a/src/XGUI/XGUI_PropertyPanel.cpp b/src/XGUI/XGUI_PropertyPanel.cpp index 09a6c727e..2f4cca0ed 100644 --- a/src/XGUI/XGUI_PropertyPanel.cpp +++ b/src/XGUI/XGUI_PropertyPanel.cpp @@ -76,4 +76,6 @@ void XGUI_PropertyPanel::updateContentWidget(boost::shared_ptr foreach(ModuleBase_ModelWidget* eachWidget, myWidgets) { eachWidget->restoreValue(theFeature); } + // the repaint is used here to immediatelly react in GUI to the values change. + repaint(); } diff --git a/src/XGUI/XGUI_PropertyPanel.h b/src/XGUI/XGUI_PropertyPanel.h index 9229b8756..546ae19b7 100644 --- a/src/XGUI/XGUI_PropertyPanel.h +++ b/src/XGUI/XGUI_PropertyPanel.h @@ -8,12 +8,14 @@ #ifndef XGUI_PROPERTYPANEL_H_ #define XGUI_PROPERTYPANEL_H_ +#include "XGUI.h" + #include #include #include -class XGUI_PropertyPanel: public QDockWidget +class XGUI_EXPORT XGUI_PropertyPanel: public QDockWidget { Q_OBJECT public: -- 2.39.2