Add Page level redraw signal
This commit is contained in:
@@ -128,7 +128,6 @@ void DrawPage::onChanged(const App::Property* prop)
|
||||
}
|
||||
} else if(prop == &Scale) {
|
||||
// touch all views in the Page as they may be dependent on this scale
|
||||
// but the views know how to get their own Scale correctly.
|
||||
const std::vector<App::DocumentObject*> &vals = Views.getValues();
|
||||
for(std::vector<App::DocumentObject *>::const_iterator it = vals.begin(); it < vals.end(); ++it) {
|
||||
TechDraw::DrawView *view = dynamic_cast<TechDraw::DrawView *>(*it);
|
||||
@@ -281,6 +280,11 @@ int DrawPage::removeView(App::DocumentObject *docObj)
|
||||
return Views.getSize();
|
||||
}
|
||||
|
||||
void DrawPage::requestPaint(void)
|
||||
{
|
||||
signalGuiPaint(this);
|
||||
}
|
||||
|
||||
void DrawPage::onDocumentRestored()
|
||||
{
|
||||
std::vector<App::DocumentObject*> featViews = Views.getValues();
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#ifndef _DrawPage_h_
|
||||
#define _DrawPage_h_
|
||||
|
||||
#include <boost/signals.hpp>
|
||||
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/DocumentObjectGroup.h>
|
||||
#include <App/PropertyStandard.h>
|
||||
@@ -57,6 +59,7 @@ public:
|
||||
int addView(App::DocumentObject *docObj);
|
||||
int removeView(App::DocumentObject* docObj);
|
||||
short mustExecute() const;
|
||||
boost::signal<void (const DrawPage*)> signalGuiPaint;
|
||||
|
||||
/// returns the type name of the ViewProvider
|
||||
virtual const char* getViewProviderName(void) const {
|
||||
@@ -84,6 +87,7 @@ public:
|
||||
double getPageHeight() const;
|
||||
const char* getPageOrientation() const;
|
||||
bool isDeleting(void) { return nowDeleting; }
|
||||
void requestPaint(void);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user