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
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
c3a7ae8d
Commit
c3a7ae8d
authored
Feb 26, 2010
by
Alexander Wiebel
Browse files
[FIX] do not add ROI although button is pressed if ROIManager has no attached
fiber dataset. This should fix unwanted crashes.
parent
05291f7b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
src/gui/qt4/WMainWindow.cpp
src/gui/qt4/WMainWindow.cpp
+7
-0
src/modules/fiberDisplay/WROIManagerFibers.cpp
src/modules/fiberDisplay/WROIManagerFibers.cpp
+2
-0
No files found.
src/gui/qt4/WMainWindow.cpp
View file @
c3a7ae8d
...
...
@@ -558,6 +558,13 @@ void WMainWindow::slotActivateModule( QString module )
void
WMainWindow
::
newRoi
()
{
// do nothing if we can not get
if
(
!
WKernel
::
getRunningKernel
()
->
getRoiManager
()
->
getDataSet
()
)
{
wlog
::
warn
(
"WMainWindow"
)
<<
"Refused to add ROI, as ROIManager does not have data set associated."
;
return
;
}
if
(
m_datasetBrowser
->
getSelectedRoi
().
get
()
==
NULL
)
{
boost
::
shared_ptr
<
WROIBox
>
newRoi
=
boost
::
shared_ptr
<
WROIBox
>
(
new
WROIBox
(
wmath
::
WPosition
(
60.
,
60.
,
60.
),
...
...
src/modules/fiberDisplay/WROIManagerFibers.cpp
View file @
c3a7ae8d
...
...
@@ -101,6 +101,7 @@ void WROIManagerFibers::addFiberDataset( boost::shared_ptr< const WDataSetFibers
void
WROIManagerFibers
::
removeFiberDataset
(
boost
::
shared_ptr
<
const
WDataSetFibers
>
/*fibers*/
)
{
assert
(
0
&&
"removeFiberDataset( --- ) not implemented yet."
);
}
boost
::
shared_ptr
<
std
::
vector
<
bool
>
>
WROIManagerFibers
::
getBitField
()
...
...
@@ -147,6 +148,7 @@ void WROIManagerFibers::recalculate()
{
mbf
=
m_bitField
;
}
int
size
=
mbf
->
size
();
mbf
->
clear
();
...
...
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