Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
546f398a
Commit
546f398a
authored
14 years ago
by
Marco Biasini
Browse files
Options
Downloads
Patches
Plain Diff
store presets in a reasonable place, not the current directory
fixes BZDNG-168
parent
a3e88865
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/gui/pymod/scene/preset_list_model.py
+10
-3
10 additions, 3 deletions
modules/gui/pymod/scene/preset_list_model.py
with
10 additions
and
3 deletions
modules/gui/pymod/scene/preset_list_model.py
+
10
−
3
View file @
546f398a
...
...
@@ -5,7 +5,7 @@ import ost
from
PyQt4
import
QtCore
,
QtGui
from
immutable_preset_info_handler
import
ImmutablePresetInfoHandler
from
preset_info_handler
import
PresetInfoHandler
from
PyQt4.QtGui
import
QDesktopServices
class
PresetListModel
(
QtCore
.
QAbstractListModel
):
IMMUTABLE_PRESET_PATH
=
os
.
path
.
join
(
ost
.
GetSharedDataPath
(),
"
scene
"
,
...
...
@@ -18,8 +18,15 @@ class PresetListModel(QtCore.QAbstractListModel):
self
.
data_
=
list
()
#Info Handler
self
.
immutable_infoh_
=
ImmutablePresetInfoHandler
(
PresetListModel
.
IMMUTABLE_PRESET_PATH
)
self
.
infoh_
=
PresetInfoHandler
(
PresetListModel
.
MUTABLE_PRESET_PATH
)
self
.
immutable_infoh_
=
ImmutablePresetInfoHandler
(
PresetListModel
.
IMMUTABLE_PRESET_PATH
)
data_loc
=
QDesktopServices
.
storageLocation
(
QDesktopServices
.
DataLocation
)
mutable_path
=
os
.
path
.
join
(
str
(
data_loc
),
'
config
'
,
PresetListModel
.
MUTABLE_PRESET_PATH
)
qdir
=
QtCore
.
QDir
(
data_loc
)
if
not
qdir
.
exists
():
qdir
.
mkpath
(
"
config
"
)
self
.
infoh_
=
PresetInfoHandler
(
mutable_path
)
self
.
LoadPresetsFromInfo
()
def
AddItem
(
self
,
preset
,
row
,
editable
,
save
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment