oc67 wrote:Ok, merci, mais donc à chaque build, je dois refaire la manip + compiler pour debian (appimage ou deb). C'est pas un problème, ça va juste me faire mettre moins souvent les mises à jours
Mon problème pour windows par contre est que je ne suis pas admin pour installer les outils de compilation. Je vais voir si je peux le faire chez moi dans une VM
Je trouve dommage de taper la conf en dur
if (settings.value("diagramcommands/erase-label-on-copy", true).toBool())
alors que permettre à chacun de choisir sa config (par exemple comme about:config de firefox) permet une certaines souplesse.
En tout cas merci pour la piste, je regarde ça à la rentrée.
Pas du tout ! L'AppImage utilise le même emplacement pour la config, ouvre le menu aide a propos de QET, va sur l'onglet log: et tu verras les chemins de config, stalesfile, etc, donc suffit de décocher l'option dans la config de QET
23:56:18.975 Info:
23:56:18.975 Info: For QET configuration-files:
23:56:18.975 Info: App Config Location: "/home/laurent/.config/QElectroTech/QElectroTech"
23:56:18.975 Info: For data-files (user-/company-collections, titleblocks, etc.):
23:56:18.975 Info: App Data Location: "/home/laurent/.local/share/QElectroTech/QElectroTech"
23:56:18.975 Info: Directory for project stalefiles:
23:56:18.975 Info: Generic Data Location: "/home/laurent/.local/share/stalefiles/QElectroTech/"
23:56:18.975 Info:
23:56:18.975 Info: Count the elements in your collections (Official-common-collection, company-collections, custom-collections):
23:56:19.051 Info: Elements collection reload
23:56:19.097 Info: Common Elements count: 8574 Elements
23:56:19.111 Info: Custom Elements count: 510 Elements
23:56:19.115 Info: Company Elements count: 205 Elements
23:56:19.115 Info:
23:56:19.115 Info: *** Qt screens ***
23:56:19.115 Info: "( 1 : 3840 x 2160 )"
23:56:19.115 Info: "( 2 : 3840 x 2160 )"
23:56:19.115 Info:
23:56:19.117 Info: DISK : /run
23:56:19.117 Info: FileSystemType: "tmpfs"
23:56:19.117 Info: SizeTotal: 6 GB
23:56:19.117 Info: AvailableSize: 6 GB
23:56:19.117 Info: DISK : /
23:56:19.117 Info: FileSystemType: "ext4"
23:56:19.117 Info: SizeTotal: 79 GB
23:56:19.117 Info: AvailableSize: 19 GB
23:56:19.117 Info: DISK : /run/lock
23:56:19.117 Info: FileSystemType: "tmpfs"
23:56:19.117 Info: SizeTotal: 0 GB
23:56:19.117 Info: AvailableSize: 0 GB
23:56:19.117 Info: DISK : /tmp
23:56:19.117 Info: FileSystemType: "tmpfs"
23:56:19.117 Info: SizeTotal: 33 GB
23:56:19.117 Info: AvailableSize: 33 GB
23:56:19.117 Debug: isReadOnly: true (../sources/machine_info.cpp:238, void MachineInfo::send_info_to_debug())
23:56:19.117 Info: DISK : /run/credentials/systemd-journald.service
23:56:19.118 Info: FileSystemType: "tmpfs"
23:56:19.118 Info: SizeTotal: 0 GB
23:56:19.118 Info: AvailableSize: 0 GB
23:56:19.118 Info: DISK : /home
23:56:19.118 Info: FileSystemType: "ext4"
23:56:19.118 Info: SizeTotal: 902 GB
23:56:19.118 Info: AvailableSize: 389 GB
23:56:19.118 Info: DISK : /media/backup3
23:56:19.118 Info: FileSystemType: "ext4"
23:56:19.118 Info: SizeTotal: 491 GB
23:56:19.118 Info: AvailableSize: 110 GB
23:56:19.118 Info: DISK : /media/backup2
23:56:19.118 Info: FileSystemType: "ext4"
23:56:19.118 Info: SizeTotal: 983 GB
23:56:19.118 Info: AvailableSize: 206 GB
23:56:19.118 Info: DISK : /boot/efi
23:56:19.118 Info: FileSystemType: "vfat"
23:56:19.118 Info: SizeTotal: 0 GB
23:56:19.118 Info: AvailableSize: 0 GB
23:56:19.118 Info: DISK : /media/backup6
23:56:19.118 Info: FileSystemType: "ext4"
23:56:19.118 Info: SizeTotal: 1967 GB
23:56:19.118 Info: AvailableSize: 954 GB
23:56:19.118 Info: DISK : /run/user/1000
23:56:19.118 Info: FileSystemType: "tmpfs"
23:56:19.118 Info: SizeTotal: 6 GB
23:56:19.118 Info: AvailableSize: 6 GB
23:56:19.118 Info: DISK : /run/user/1000/doc
23:56:19.118 Info: FileSystemType: "fuse.portal"
23:56:19.118 Info: SizeTotal: 0 GB
23:56:19.118 Info: AvailableSize: 0 GB
23:56:19.118 Debug: isReadOnly: true (../sources/machine_info.cpp:249, void MachineInfo::send_info_to_debug())
23:56:19.118 Info: DISK USED: /tmp/.mount_QElectggoFOy
23:56:19.119 Info: FileSystemType: "fuse.QElectroTech_0.100.0-r8481-x86_64.AppImage"
23:56:19.119 Info: SizeTotal: 0 GB
23:56:19.119 Info: AvailableSize: 0 GB
23:56:19.119 Info: Count All Elements in collections = 9289 Elements
23:56:19.421 Info: Elements collection finished to be loaded in 0.369 seconds
Tu remarqueras si tu lis le code que tu quand copy/paste un élément tu crées un nouveau UUID et tu effaces les liens.
//this is the first paste, we do some actions for the new element
const QList <Element *> elmts_list = content.m_elements;
for (Element *e : elmts_list)
{
//make new uuid, because old uuid are the uuid of the copied element
e -> newUuid();
if (settings.value("diagramcommands/erase-label-on-copy", true).toBool())
{
//Reset the information about the label, the comment and location
DiagramContext dc = e->elementInformations();
dc.addValue("formula", "");
dc.addValue("label", "");
dc.addValue("comment", "");
dc.addValue("location", "");
e->setElementInformations(dc);
//Reset the text of conductors
const QList <Conductor *> conductors_list = content.m_conductors_to_move;
for (Conductor *c : conductors_list)
{
ConductorProperties cp = c -> properties();
cp.text = c->diagram() ? c -> diagram() -> defaultConductorProperties.text : "_";
c -> setProperties(cp);
}
}
}
}
else
{
const QList<QGraphicsItem *> qgis_list = content.items(filter);
for (QGraphicsItem *item : qgis_list) {
diagram->addItem(item);
}
}
const QList<QGraphicsItem *> qgis_list = content.items();
for (QGraphicsItem *qgi : qgis_list)
qgi -> setSelected(true);
}
The correct approach would be to keep the links to the slaves when you cutting and pasting only a master.
If a master element is deleted, it works well with undo/redo to restore it, so this part of the code should be looked at when someone has time.