mirror of
https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio.git
synced 2024-12-18 14:06:30 +00:00
graphmanager: update description on property remove
The node must update its description when a property value has been removed.
This commit is contained in:
parent
1eb49731e1
commit
72dcde0ad3
2 changed files with 3 additions and 1 deletions
|
@ -350,6 +350,7 @@ impl PropertyExt for Node {
|
|||
let private = imp::Node::from_instance(self);
|
||||
trace!("property name={} removed", name);
|
||||
private.properties.borrow_mut().remove(name);
|
||||
self.update_description();
|
||||
}
|
||||
|
||||
/// Retrieves node properties.
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
use log::info;
|
||||
use std::cell::Ref;
|
||||
use std::collections::HashMap;
|
||||
|
||||
pub trait PropertyExt {
|
||||
fn hidden_property(&self, name: &str) -> bool {
|
||||
name.starts_with('_')
|
||||
|
@ -38,6 +38,7 @@ pub trait PropertyExt {
|
|||
///
|
||||
fn update_properties(&self, new_properties: &HashMap<String, String>) {
|
||||
for (key, value) in new_properties {
|
||||
info!("Updating property name={} value={}", key, value);
|
||||
if value.is_empty() {
|
||||
self.remove_property(key);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue