Commit 0713ec508ce37b1cfae9a929f4db66048a6e297b
1 parent
0de35379
Exists in
master
and in
68 other branches
ENH: Set button colour related to volume viewer background colour FIX #62
Showing
1 changed file
with
7 additions
and
4 deletions
Show diff stats
invesalius/data/volume.py
| ... | ... | @@ -125,6 +125,7 @@ class Volume(): |
| 125 | 125 | |
| 126 | 126 | def OnUpdatePreset(self, pubsub_evt): |
| 127 | 127 | self.__load_preset_config() |
| 128 | + | |
| 128 | 129 | if self.config: |
| 129 | 130 | if self.exist: |
| 130 | 131 | self.__load_preset() |
| ... | ... | @@ -134,7 +135,11 @@ class Volume(): |
| 134 | 135 | self.LoadVolume() |
| 135 | 136 | self.CalculateHistogram() |
| 136 | 137 | self.exist = 1 |
| 137 | - | |
| 138 | + | |
| 139 | + colour = self.GetBackgroundColour() | |
| 140 | + ps.Publisher.sendMessage('Change volume viewer background colour', colour) | |
| 141 | + ps.Publisher.sendMessage('Change volume viewer gui colour', colour) | |
| 142 | + | |
| 138 | 143 | def __load_preset_config(self): |
| 139 | 144 | self.config = prj.Project().raycasting_preset |
| 140 | 145 | |
| ... | ... | @@ -159,10 +164,8 @@ class Volume(): |
| 159 | 164 | # Update other information |
| 160 | 165 | self.SetShading() |
| 161 | 166 | self.SetTypeRaycasting() |
| 162 | - colour = self.GetBackgroundColour() | |
| 163 | - ps.Publisher.sendMessage('Change volume viewer background colour', colour) | |
| 164 | - ps.Publisher.sendMessage('Change volume viewer gui colour', colour) | |
| 165 | 167 | |
| 168 | + | |
| 166 | 169 | def OnSetCurve(self, pubsub_evt): |
| 167 | 170 | self.curve = pubsub_evt.data |
| 168 | 171 | self.CalculateWWWL() | ... | ... |