nodeeditor icon indicating copy to clipboard operation
nodeeditor copied to clipboard

Add a signal `modified` for the scene.

Open zmoth opened this issue 2 years ago • 2 comments

This signal is sent when nodes or connections change.

Many editors will have a file modified flag after modifying the file. We can connect this signal to determine which scene has been modified. image image

zmoth avatar Feb 13 '23 08:02 zmoth

It could be interesting adding it in the calculator example. Should be quite simple, connecting the modified signal to the QWidget::setWindowModified(bool).

connect(scene, &BasicGraphicsScene::modified, this, [this](){ setWindowsModified(true); };

Daguerreo avatar Feb 14 '23 08:02 Daguerreo

@Daguerreo I have made changes to the calculator example. In order to be able to remove the flag when saving and keep it when saving aborts. I had to make changes to the save() and load() functions image

zmoth avatar Feb 14 '23 09:02 zmoth