mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-08 14:49:58 +01:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user