{"action":"created","issue":{"url":"https://api.github.com/repos/Qucs/qucs/issues/502","repository_url":"https://api.github.com/repos/Qucs/qucs","labels_url":"https://api.github.com/repos/Qucs/qucs/issues/502/labels{/name}","comments_url":"https://api.github.com/repos/Qucs/qucs/issues/502/comments","events_url":"https://api.github.com/repos/Qucs/qucs/issues/502/events","html_url":"https://github.com/Qucs/qucs/issues/502","id":144524605,"number":502,"title":"solved issue, developers attention needed","user":{"login":"alysogorov","id":18163604,"avatar_url":"https://avatars.githubusercontent.com/u/18163604?v=3","gravatar_id":"","url":"https://api.github.com/users/alysogorov","html_url":"https://github.com/alysogorov","followers_url":"https://api.github.com/users/alysogorov/followers","following_url":"https://api.github.com/users/alysogorov/following{/other_user}","gists_url":"https://api.github.com/users/alysogorov/gists{/gist_id}","starred_url":"https://api.github.com/users/alysogorov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alysogorov/subscriptions","organizations_url":"https://api.github.com/users/alysogorov/orgs","repos_url":"https://api.github.com/users/alysogorov/repos","events_url":"https://api.github.com/users/alysogorov/events{/privacy}","received_events_url":"https://api.github.com/users/alysogorov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-03-30T09:56:29Z","updated_at":"2016-10-22T13:23:44Z","closed_at":null,"body":"Hi. I solved an annoying(at least for me)  issue with wrong cross painting in wire creating mode of schematics editor. Vertical and horizontal lines could move or disappear because of schematics scroll or/and zoom.\r\n\r\nIt is function  ( `mouseactions.cpp` ):\r\n\r\n`void MouseActions::MMoveWire1(Schematic *Doc, QMouseEvent *Event)` where coordinates of crossed lines were calculated wrong.\r\n\r\nHere is correct code of this function( line 346 of the file).\r\nold code is commented in `#if #endif` section\r\n```\r\nvoid MouseActions::MMoveWire1(Schematic *Doc, QMouseEvent *Event)\r\n{\r\n#if 0\r\n\tMAx3 = DOC_X_POS(Event->pos().x());\r\n\tMAy3 = DOC_Y_POS(Event->pos().y());\r\n\tDoc->setOnGrid(MAx3, MAy3);\r\n\r\n\tMAx2  = DOC_X_POS(Doc->viewport()->width());\r\n\tMAy2  = DOC_Y_POS(Doc->viewport()->height());\r\n\r\n\tDoc->PostPaintEvent (_Line, Doc->ViewX1, MAy3, MAx2, MAy3);\r\n\tDoc->PostPaintEvent (_Line, MAx3, Doc->ViewY1, MAx3, MAy2);\r\n\tDoc->viewport()->update();\r\n#endif\r\n\r\n\t//we are working on local variables and will assign values\r\n\t//to object properties at the end\r\n\tint lx = DOC_X_POS(Event->pos().x());//get mice coordinates translated to document space\r\n\tint ly = DOC_Y_POS(Event->pos().y());\r\n\tDoc->setOnGrid(lx,ly); //align on grid\r\n\r\n\t//let we reserve couple of points at the edges of lines for some aesthetics,\r\n\t//and visual check that our calculations have fit the widget window.\r\n\tconst int ldelta = 2;\r\n\r\n\t//left and upper edges of our lines\r\n\tint lx0 = DOC_X_POS(Doc->contentsX()+ldelta);\r\n\tint ly0 = DOC_Y_POS(Doc->contentsY()+ldelta);\r\n\r\n\t//right and bottom edges\r\n\tint lx1 = DOC_X_POS(Doc->contentsX()+Doc->viewport()->width()-1-ldelta);\r\n\tint ly1 = DOC_Y_POS(Doc->contentsY()+Doc->viewport()->height()-1-ldelta);\r\n\t\r\n\tDoc->PostPaintEvent (_Line, lx0, ly, lx1, ly);\r\n\tDoc->PostPaintEvent (_Line, lx, ly0, lx, ly1);\r\n\t//simulate behaviour of old code with object variables.\r\n\tMAx3 = lx;\r\n\tMAy3 = ly;\r\n\r\n\t//why it is needed i do not know, just for equivalence  :)\r\n\tMAx2 = lx1;\r\n\tMAy2 = ly1;\r\n\r\n\tDoc->viewport()->update(); // seems this call is excessive??? but let it be.\r\n}\r\n```\r\n\r\nSolution is tested, and works correctly(at least under my Ubuntu 14.04!!!).\r\nSomeone has to put in into git(I'm a plain user and have not access).\r\n\r\nRegards\r\nAlex.\r\n\r\nps. day ago I've put the same letter to qucs-devel@lists.sourceforge.net, was recommended to put the letter here, but here I added a couple of lines and comments to the code, so this variant is more complete than from my letter to qucs-devel@lists.sourceforge.net\r\n\r\npss... Hmm. It's my first letter to github... and how to properly insert c++ code in a letter?... ok, seems it is still readable."},"comment":{"url":"https://api.github.com/repos/Qucs/qucs/issues/comments/255528180","html_url":"https://github.com/Qucs/qucs/issues/502#issuecomment-255528180","issue_url":"https://api.github.com/repos/Qucs/qucs/issues/502","id":255528180,"user":{"login":"felix-salfelder","id":1772519,"avatar_url":"https://avatars.githubusercontent.com/u/1772519?v=3","gravatar_id":"","url":"https://api.github.com/users/felix-salfelder","html_url":"https://github.com/felix-salfelder","followers_url":"https://api.github.com/users/felix-salfelder/followers","following_url":"https://api.github.com/users/felix-salfelder/following{/other_user}","gists_url":"https://api.github.com/users/felix-salfelder/gists{/gist_id}","starred_url":"https://api.github.com/users/felix-salfelder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felix-salfelder/subscriptions","organizations_url":"https://api.github.com/users/felix-salfelder/orgs","repos_url":"https://api.github.com/users/felix-salfelder/repos","events_url":"https://api.github.com/users/felix-salfelder/events{/privacy}","received_events_url":"https://api.github.com/users/felix-salfelder/received_events","type":"User","site_admin":false},"created_at":"2016-10-22T13:23:44Z","updated_at":"2016-10-22T13:23:44Z","body":"(sorry, i'm not fully aware what this is about).\r\nis there a pull request with a patch anywhere?"}}
{"actor":{"display_login":"felix-salfelder"}}