gam17 / QAD

Quantum Aided Design - cad tools plugin for QGIS
GNU General Public License v3.0
27 stars 13 forks source link

qad.ini reverts to default on open new project #8

Closed sdnxgr closed 7 years ago

sdnxgr commented 8 years ago

Not necessarily a bug, but just wondering if there's a way to apply settings globally in the qad.ini file for all subsequent projects. I've noticed that upon saving/applying new settings, the .ini will update and save in C:\Users\Owner.qgis2\python\plugins\qad as expected, but upon closing and reopening QGIS, the settings revert to originals. I understand that each project will save it's own settings along with the .qgs, but a global option would be nice. Otherwise thanks very much for a godsend plugin for us CAD/GIS users.

Running: Windows 7 SP1 64bit QGIS 2.14.1

gam17 commented 8 years ago

That's true. Actually QAD uses the qad.ini file in the same folder of the current qgis project. When you create a new qgis project or open an existing one (without qad.ini file) then qad reads the options from C:\Users\Owner.qgis2\python\plugins\qad folder (or it uses the the default settings if qad.ini file is not present in that folder). I know global options would be nice but this make a qgis project more portable in fact you can copy the project folder from a pc to another without loosing the qad settings. I can consider to change the logic in the future: what options do you think can be considered globals ? (open qad.ini, it's a text file)

sdnxgr commented 8 years ago

Thanks for the reply. As an original CAD user having moved to GIS, most CAD users usually set their preferences as global at the outset. I can't think of circumstances under which I would change them in any project. That doesn't include snapping or other project-exclusive settings. I like the options you've got as they are actually. Maybe there's a small bug that initially reverts to default settings. I'll keep working with it and indicate any anomalies etc. Thx again for a fantastic plugin.

sdnxgr commented 8 years ago

Sorry, just to clarify, I'm thinking that most of the settings you provide could be considered global and set after initial use in the qad.ini The only issue I ran into was opening a new project and having that file reverting back to default settings. I overcame this by copying my settings from one project's qad to the folder you specified. Still, it seems to want to revert to stock plugin settings. I hope that clarifies somewhat.

gam17 commented 7 years ago

Only to inform you I changed the QAD system variable management. In the next release only a few variables will be project dependent, most QAD variables will be saved in C:\Users\Owner.qgis2\python\plugins\qad folder and they will be used indipendently from the project in use. In the change log system I added that this change came from you. Wait for the next QAD release, I will upload it when I'll teminate to develope some new commands and the spanish localization. Thank you for your collaboration.

sdnxgr commented 7 years ago

Thanks and sorry for the late reply - was out of town for a while. I noticed the changes for the new version - thanks for that. I'm still noticing that with each new QGS project, qad is reverting to the defaults. I just upgraded to 2.16 so I'm not sure if that makes a difference. What I was thinking would be good, stable settings for qad (which I think most CAD users would agree with) are just colors, pickbox sizes, grip sizes and colors. While portability is nice (re: the localized qad.ini), I would think most users would like to have their preferred settings saved/read from the plugin folder upon startup. Just my opinion. Also, I'm not sure if this is a new issue or not, but I was just noticing that mouse wheel zooming is now disabled while qad is active. I don't think that was the case before but not sure. Is that something that can be fixed? wheel zooming while editing is definitely a bonus. Thanks again!

gam17 commented 7 years ago

The wheel zooming issue was fixed in https://github.com/gam17/QAD/issues/9

I tried to create new projects but I don't see QAD reverting to the default values. Can you show me an example (i.e. what is the valued reverted to the default) ? thanks to make QAD a better plugin gam17

Thanks and sorry for the late reply - was out of town for a while. I noticed the changes for the new version - thanks for that. I'm still noticing that with each new QGS project, qad is reverting to the defaults. I just upgraded to 2.16 so I'm not sure if that makes a difference. What I was thinking would be good, stable settings for qad (which I think most CAD users would agree with) are just colors, pickbox sizes, grip sizes and colors. While portability is nice (re: the localized qad.ini), I would think most users would like to have their preferred settings saved/read from the plugin folder upon startup. Just my opinion. Also, I'm not sure if this is a new issue or not, but I was just noticing that mouse wheel zooming is now disabled while qad is active. I don't think that was the case before but not sure. Is that something that can be fixed? wheel zooming while editing is definitely a bonus. Thanks again!

sdnxgr commented 7 years ago

What is happening is that when I open a new or existing project, the colors begin with original defaults. But if I go to the settings dialogue and simply hit the colors button and apply, they return to the settings I designated previously. It's not a big deal, but thought you might want to know.

I'm more concerned about the loss of wheel zooming while QAD is activated. Still not working. QGIS version 2.16.3 Any advice on that? Thanks!

sdnxgr commented 7 years ago

Never mind, sorry: I inserted the extra line of code you posted in #9 and now zoom is working fine. Sorry to bother you!

gam17 commented 7 years ago

hi sdnxgr, I checked the bug related to the color and now it is fixed. In the next release of qad it will be corrected ! thank you again