-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New features: undo and redo historial #255
base: master
Are you sure you want to change the base?
Conversation
features such as undo and redo historial to be introduced on this software, but I could not make it real so far. In fact, here is the solution that all of you expected from me. I'm sorry for having took too long and thank you for your patience. Back to the point of this commit, you can now make changes like part creation on canvas, parts moved, rotated and deleted ones, as well as you can do the same operations with wires. Operation with textboxes are not currently supported. Everything before mentioned has undo and redo support. Last but not least, you can watch the .ogv video which will show you the way things work alternating such commands from the toolbar. Nothing else by now, so... best regards, folks!!!
@@ -231,7 +231,7 @@ static gboolean gnucap_generate_netlist (OreganoEngine *engine, const gchar *fil | |||
for (iter = output.models; iter; iter = iter->next) { | |||
gchar *model; | |||
model = (gchar *)iter->data; | |||
g_fprintf (file, ".include %s/%s.model\n", OREGANO_MODELDIR, model); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the OREGANO_MODEL dir guaranteed to have a trailiing backslash?
Hi Bernhard, of course it does. I've seen many issues from different people
related to double trailing slash
and things have gone wrong for them. Everyone points to the same question.
Note the attached file in this email:
it's a light switch schematic generated with netlist and works fine for me
and maybe for you too.
Pay special attention to the ".include
/usr/local/share/oregano/models/Switch.model" line. If you don't fix
the "src/engines/gnucap.c" file, you're going to get a double slash after
"models/" dir, that is,
".include /usr/local/share/oregano/models//Switch.model".
Yours sincerely,
Daniel Dwek
…On Fri, Jan 13, 2023 at 6:07 AM Bernhard Schuster ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/engines/gnucap.c
<#255 (comment)>:
> @@ -231,7 +231,7 @@ static gboolean gnucap_generate_netlist (OreganoEngine *engine, const gchar *fil
for (iter = output.models; iter; iter = iter->next) {
gchar *model;
model = (gchar *)iter->data;
- g_fprintf (file, ".include %s/%s.model\n", OREGANO_MODELDIR, model);
Is the OREGANO_MODEL dir guaranteed to have a trailiing backslash?
—
Reply to this email directly, view it on GitHub
<#255 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJPNXRFI62QOH7BTZXFB5IDWSELNHANCNFSM6AAAAAATZNTJDA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
if (g_signal_handler_is_connected (G_OBJECT (item_data), item_data->created_handler_id)) | ||
g_signal_emit_by_name (G_OBJECT (item_data), "created", pos); | ||
if (signals & EMIT_SIGNAL_MOVED) | ||
if (g_signal_handler_is_connected (G_OBJECT (item_data), item_data->moved_handler_id)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to check if the signal handler is connected?
Hi again, It was always my intention let the vast majority of the code
unchanged. As far as I remember, signal handlers are unsigned long type and
public members of the "struct _ItemData" structure, so that you can check
for values different than zero and make sure that there's a handler
connected to be used as a function pointer with optional data passed as
argument.
In my humble opinion, I wouldn't do that way, but once again, I only
focused on stack operations and I tried to not change work done for anyone
else.
Keep in mind that eliminate all of those handlers will require lot of
grepping but after all there's no warranty that software runs properly.
Finally, If you still think on getting rid such longs, just let me know and
I'm going to do it for you.
…On Fri, Jan 13, 2023, 9:56 AM Bernhard Schuster ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/model/item-data.c
<#255 (comment)>:
> cairo_matrix_init_translate (&(priv->translate), pos->x, pos->y);
- handler_connected =
- g_signal_handler_is_connected (G_OBJECT (item_data), item_data->moved_handler_id);
- if (handler_connected) {
- g_signal_emit_by_name (G_OBJECT (item_data), "moved", pos);
- }
- handler_connected =
- g_signal_handler_is_connected (G_OBJECT (item_data), item_data->changed_handler_id);
- if (handler_connected) {
- g_signal_emit_by_name (G_OBJECT (item_data), "changed");
- }
+ if (signals & EMIT_SIGNAL_CREATED)
+ if (g_signal_handler_is_connected (G_OBJECT (item_data), item_data->created_handler_id))
+ g_signal_emit_by_name (G_OBJECT (item_data), "created", pos);
+ if (signals & EMIT_SIGNAL_MOVED)
+ if (g_signal_handler_is_connected (G_OBJECT (item_data), item_data->moved_handler_id))
Why do we need to check if the signal handler is connected?
—
Reply to this email directly, view it on GitHub
<#255 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJPNXRE2CVIQWGIWW7ENUP3WSFGGXANCNFSM6AAAAAATZNTJDA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! It'll take a few days until I enable CI again
Awesome, thanks! While I was writing this patch I noticed that "recently
opened files" submenu did not work as well as zoom in and out adjusted with
the mouse wheel doesn't have a counterpart function to update different
values in the "zoom" menu. I think that I can solve it in just a few couple
of days if you agree, of course.
Have a great day!
Daniel Dwek
…On Tue, Jan 17, 2023, 6:11 AM Bernhard Schuster ***@***.***> wrote:
***@***.**** approved this pull request.
Thank you! It'll take a few days until I enable CI again
—
Reply to this email directly, view it on GitHub
<#255 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJPNXRABK2I3CTDLHURYL5DWSZO2NANCNFSM6AAAAAATZNTJDA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hello everyone! A long long time ago I opened an issue about lacking features features such as undo and redo historial to be introduced on this software, but I could not make it real so far.
In fact, here is the solution that all of you expected from me. I'm sorry for having took too long and thank you for your patience.
Back to the point of this commit, you can now make changes like part creation on canvas, parts moved, rotated and deleted ones, as well as you can do the same operations with wires. Operation with textboxes are not currently supported. Everything before mentioned has undo and redo support.
Last but not least, you can watch the .ogv video which will show you the way things work alternating such commands from the toolbar.
Nothing else by now, so... best regards, folks!!!