Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
vite
Commits
1b2ca817
Commit
1b2ca817
authored
Aug 28, 2014
by
Thibault Soucarre
Browse files
correct a bug when changing color/visible many times before using apply button
parent
e2bd249e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/interface/Settings_window.cpp
View file @
1b2ca817
...
...
@@ -208,8 +208,12 @@ void Settings_window::color_changed(string name, QTableWidget *table, const QCol
S
.
add_state_to_palette
(
name
,
palette_name
,
state_name
,
color
,
checked
);
p
->
add_state
(
state_name
,
color
,
checked
);
//_c->change_entity_color(state_name, color.get_red(), color.get_green(), color.get_blue());
std
::
pair
<
std
::
string
,
Color
>
change
(
state_name
,
color
);
_states_changes
.
insert
(
change
);
if
(
_states_changes
.
count
(
state_name
)
>
0
)
_states_changes
[
state_name
]
=
color
;
else
{
std
::
pair
<
std
::
string
,
Color
>
change
(
state_name
,
color
);
_states_changes
.
insert
(
change
);
}
return
;
}
...
...
@@ -234,9 +238,14 @@ void Settings_window::visible_changed(string name, QTableWidget *table, const bo
Color
color
(
qc
.
red
()
/
255
,
qc
.
green
()
/
255
,
qc
.
blue
()
/
255
);
S
.
add_state_to_palette
(
name
,
palette_name
,
state_name
,
color
,
checked
);
p
->
add_state
(
state_name
,
color
,
checked
);
if
(
_states_visible_changes
.
count
(
state_name
)
>
0
)
_states_visible_changes
[
state_name
]
=
checked
;
else
{
std
::
pair
<
std
::
string
,
bool
>
change
(
state_name
,
checked
);
_states_visible_changes
.
insert
(
change
);
}
return
;
}
void
Settings_window
::
add_table_line
(
QTableWidget
*
table
,
const
char
*
color_slot
,
...
...
Write
Preview
Supports
Markdown
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