Fix delayed painting
- Annotation and Image were not being painted immediately, but had to wait for a page refresh.
This commit is contained in:
@@ -89,14 +89,9 @@ void DrawViewAnnotation::onChanged(const App::Property* prop)
|
||||
prop == &TextColor ||
|
||||
prop == &TextSize ||
|
||||
prop == &LineSpace ||
|
||||
prop == &TextStyle || //changing this doesn't recompute until focus changes??
|
||||
prop == &TextStyle ||
|
||||
prop == &MaxWidth) {
|
||||
try {
|
||||
App::DocumentObjectExecReturn *ret = recompute();
|
||||
delete ret;
|
||||
}
|
||||
catch (...) {
|
||||
}
|
||||
requestPaint();
|
||||
}
|
||||
}
|
||||
TechDraw::DrawView::onChanged(prop);
|
||||
|
||||
@@ -66,6 +66,7 @@ void DrawViewImage::onChanged(const App::Property* prop)
|
||||
{
|
||||
if (prop == &ImageFile) {
|
||||
if (!isRestoring()) {
|
||||
requestPaint();
|
||||
}
|
||||
}
|
||||
TechDraw::DrawView::onChanged(prop);
|
||||
@@ -73,6 +74,7 @@ void DrawViewImage::onChanged(const App::Property* prop)
|
||||
|
||||
App::DocumentObjectExecReturn *DrawViewImage::execute(void)
|
||||
{
|
||||
requestPaint();
|
||||
return DrawView::execute();
|
||||
}
|
||||
|
||||
|
||||
@@ -111,9 +111,8 @@ void QGIViewAnnotation::draw()
|
||||
}
|
||||
|
||||
drawAnnotation();
|
||||
if (borderVisible) {
|
||||
drawBorder();
|
||||
}
|
||||
QGIView::draw();
|
||||
|
||||
}
|
||||
|
||||
//TODO: text is positioned slightly high (and left??) on page save to SVG file
|
||||
|
||||
@@ -121,9 +121,8 @@ void QGIViewImage::draw()
|
||||
m_cliparea->setRect(newRect);
|
||||
drawImage();
|
||||
m_cliparea->centerAt(0.0,0.0);
|
||||
if (borderVisible) {
|
||||
drawBorder();
|
||||
}
|
||||
|
||||
QGIView::draw();
|
||||
}
|
||||
|
||||
void QGIViewImage::drawImage()
|
||||
|
||||
@@ -204,7 +204,8 @@ int QGVPage::addQView(QGIView *view)
|
||||
}
|
||||
|
||||
view->setPos(viewPos);
|
||||
|
||||
view->updateView(true);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user