Link single element widget, set live edit enable.

In properties dock widget, no need to click on apply button, change are apply immediately.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3992 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2015-05-27 07:22:50 +00:00
parent c3ab81e9c3
commit 2242ebd16a
12 changed files with 199 additions and 95 deletions

View File

@@ -78,6 +78,7 @@ void DiagramPropertiesEditorDockWidget::selectionChanged()
{
QGraphicsItem *item = m_diagram->selectedItems().first();
//Edit an element
if (Element *elmt = dynamic_cast<Element*>(item))
{
if (m_edited_qgi_type == ElementQGIType && editors().size() == 1)
@@ -93,17 +94,22 @@ void DiagramPropertiesEditorDockWidget::selectionChanged()
m_edited_qgi_type = ElementQGIType;
addEditor(new ElementPropertiesWidget(elmt, this));
}
//Edit an image
else if (DiagramImageItem *image = dynamic_cast<DiagramImageItem *>(item))
{
clear();
m_edited_qgi_type = ImageQGIType;
addEditor(new ImagePropertiesWidget(image, this));
}
//Unknow type, we clear the dock
else
clear();
}
else
clear();
foreach(PropertiesEditorWidget *pew, editors())
pew->setLiveEdit(true);
}
/**