Fix issue #29 view handles
This commit is contained in:
parent
8cbd6d0b23
commit
a15825fa4c
|
@ -471,11 +471,19 @@ void QGVPage::toggleEdit(bool enable)
|
|||
//itemView->updateView(true);
|
||||
}
|
||||
|
||||
int textItemType = QGraphicsItem::UserType + 160;
|
||||
QGraphicsItem*item = dynamic_cast<QGraphicsItem*>(*it);
|
||||
if(item) {
|
||||
//item->setCacheMode((enable) ? QGraphicsItem::DeviceCoordinateCache : QGraphicsItem::NoCache);
|
||||
item->setCacheMode((enable) ? QGraphicsItem::NoCache : QGraphicsItem::NoCache);
|
||||
item->update();
|
||||
if (item->type() == textItemType) { //TODO: move this into SVGTemplate or TemplateTextField
|
||||
if (enable) {
|
||||
item->show();
|
||||
} else {
|
||||
item->hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scene()->update();
|
||||
|
|
|
@ -51,6 +51,10 @@ namespace TechDrawGui
|
|||
|
||||
~TemplateTextField();
|
||||
|
||||
enum {Type = QGraphicsItem::UserType + 160};
|
||||
int type() const { return Type;}
|
||||
|
||||
|
||||
/// Returns the field name that this TemplateTextField represents
|
||||
std::string fieldName() const { return fieldNameStr; }
|
||||
protected:
|
||||
|
@ -61,4 +65,3 @@ namespace TechDrawGui
|
|||
} // namespace TechDrawGui
|
||||
|
||||
#endif // #ifndef DRAWINGGUI_TEMPLATETEXTFIELD_H
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user