View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000166 | QElectroTech | website | public | 2018-11-22 10:21 | 2021-02-15 00:53 |
| Reporter | Kristian | Assigned To | black_sun_2012 | ||
| Priority | normal | Severity | feature | Reproducibility | have not tried |
| Status | resolved | Resolution | fixed | ||
| Platform | all | OS | all | OS Version | all |
| Summary | 0000166: Make path to user defined templates configurable | ||||
| Description | We are working in a team using the same library of a common user collection shared on a network drive. Configuring that folder in settings is very convenient as we are all up to date. The sme feature would be nice to have for the templates. Existing: Setting / General / Collection --> User collection path New: Setting / General / Templates --> User templates path Thanks in advance | ||||
| Tags | menu | ||||
| Attached Files | |||||
|
|
Thanks Kristian to report it. A possible patch, but only work on unix system like linux macOS. I think we need to add new QFileDialog widget in settings for chose user templates.
custom_tbt.diff (1,517 bytes)
diff --git a/sources/qetapp.cpp b/sources/qetapp.cpp
index .. 100644
--- a/sources/qetapp.cpp
+++ b/sources/qetapp.cpp
@@ -491,7 +491,7 @@
}
}
else if (m_user_custom_elements_dir != "default") {
- return m_user_custom_elements_dir;
+ return m_user_custom_elements_dir + "/elements/";
}
return(configDir() + "elements/");
@@ -559,6 +559,27 @@
templates collection.
*/
QString QETApp::customTitleBlockTemplatesDir() {
+ if (m_user_custom_elements_dir.isEmpty())
+ {
+ QSettings settings;
+ QString path = settings.value("elements-collections/custom-collection-path", "default").toString();
+ if (path != "default" && !path.isEmpty())
+ {
+ QDir dir(path);
+ if (dir.exists())
+ {
+ m_user_custom_elements_dir = path;
+ return m_user_custom_elements_dir;
+ }
+ }
+ else {
+ m_user_custom_elements_dir = "default";
+ }
+ }
+ else if (m_user_custom_elements_dir != "default") {
+ return (m_user_custom_elements_dir + "/titleblocks/");
+ }
+
return(configDir() + "titleblocks/");
}
diff --git a/sources/ui/configpage/generalconfigurationpage.ui b/sources/ui/configpage/generalconfigurationpage.ui
index .. 100644
--- a/sources/ui/configpage/generalconfigurationpage.ui
+++ b/sources/ui/configpage/generalconfigurationpage.ui
@@ -41,7 +41,7 @@
</size>
</property>
<property name="currentIndex">
- <number>0</number>
+ <number>2</number>
</property>
<widget class="QWidget" name="tab_3">
<attribute name="title">
|
|
|
Fixed by 5605 commit |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2018-11-22 10:21 | Kristian | New Issue | |
| 2018-11-22 10:21 | Kristian | Tag Attached: menu | |
| 2018-11-25 10:00 | scorpio810_mantis | File Added: custom_tbt.diff | |
| 2018-11-25 10:00 | scorpio810_mantis | Note Added: 0000357 | |
| 2018-11-25 10:01 | scorpio810_mantis | Assigned To | => black_sun_2012 |
| 2018-11-25 10:01 | scorpio810_mantis | Status | new => assigned |
| 2018-11-25 10:03 | scorpio810_mantis | Note Edited: 0000357 | |
| 2018-11-25 10:57 | scorpio810_mantis | Note Added: 0000358 | |
| 2018-11-25 10:57 | scorpio810_mantis | Note Edited: 0000358 | |
| 2018-11-25 12:03 | scorpio810_mantis | Status | assigned => resolved |
| 2018-11-25 12:03 | scorpio810_mantis | Resolution | open => fixed |
| 2018-11-25 12:03 | scorpio810_mantis | Fixed in Version | => SVN/trunk |
| 2021-02-15 00:47 |
|
Product Version | SVN/branches/0.x => SVN/trunk |
| 2021-02-15 00:53 |
|
Category | other => website |