Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
258
Issues
258
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
Kdenlive
Commits
95193a44
Commit
95193a44
authored
Aug 07, 2019
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix effect presets broken on comma locales, clear preset after resetting effect
Fixes
#303
parent
a8e74a7f
Pipeline
#6320
passed with stage
in 15 minutes and 25 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
src/assets/model/assetparametermodel.cpp
src/assets/model/assetparametermodel.cpp
+2
-2
src/assets/view/assetparameterview.cpp
src/assets/view/assetparameterview.cpp
+5
-3
No files found.
src/assets/model/assetparametermodel.cpp
View file @
95193a44
...
...
@@ -601,7 +601,7 @@ QJsonDocument AssetParameterModel::toJson(bool includeFixed) const
QJsonObject
currentParam
;
QModelIndex
ix
=
index
(
m_rows
.
indexOf
(
fixed
.
first
),
0
);
currentParam
.
insert
(
QLatin1String
(
"name"
),
QJsonValue
(
fixed
.
first
));
currentParam
.
insert
(
QLatin1String
(
"value"
),
fixed
.
second
.
t
oString
(
));
currentParam
.
insert
(
QLatin1String
(
"value"
),
fixed
.
second
.
t
ype
()
==
QVariant
::
Double
?
QJsonValue
(
fixed
.
second
.
toDouble
())
:
QJsonValue
(
fixed
.
second
.
toString
()
));
int
type
=
data
(
ix
,
AssetParameterModel
::
TypeRole
).
toInt
();
double
min
=
data
(
ix
,
AssetParameterModel
::
MinRole
).
toDouble
();
double
max
=
data
(
ix
,
AssetParameterModel
::
MaxRole
).
toDouble
();
...
...
@@ -628,7 +628,7 @@ QJsonDocument AssetParameterModel::toJson(bool includeFixed) const
QJsonObject
currentParam
;
QModelIndex
ix
=
index
(
m_rows
.
indexOf
(
param
.
first
),
0
);
currentParam
.
insert
(
QLatin1String
(
"name"
),
QJsonValue
(
param
.
first
));
currentParam
.
insert
(
QLatin1String
(
"value"
),
QJsonValue
(
param
.
second
.
value
.
toString
()));
currentParam
.
insert
(
QLatin1String
(
"value"
),
param
.
second
.
value
.
type
()
==
QVariant
::
Double
?
QJsonValue
(
param
.
second
.
value
.
toDouble
())
:
QJsonValue
(
param
.
second
.
value
.
toString
()));
int
type
=
data
(
ix
,
AssetParameterModel
::
TypeRole
).
toInt
();
double
min
=
data
(
ix
,
AssetParameterModel
::
MinRole
).
toDouble
();
double
max
=
data
(
ix
,
AssetParameterModel
::
MaxRole
).
toDouble
();
...
...
src/assets/view/assetparameterview.cpp
View file @
95193a44
...
...
@@ -142,9 +142,11 @@ void AssetParameterView::resetValues()
const
QVector
<
QPair
<
QString
,
QVariant
>>
values
=
getDefaultValues
();
auto
*
command
=
new
AssetUpdateCommand
(
m_model
,
values
);
pCore
->
pushUndo
(
command
);
/*if (m_mainKeyframeWidget) {
m_mainKeyframeWidget->resetKeyframes();
}*/
// Unselect preset if any
QAction
*
ac
=
m_presetGroup
->
checkedAction
();
if
(
ac
)
{
ac
->
setChecked
(
false
);;
}
}
void
AssetParameterView
::
commitChanges
(
const
QModelIndex
&
index
,
const
QString
&
value
,
bool
storeUndo
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment