Skip to content

Commit a03da61

Browse files
committed
Various small fixes
1 parent af659ff commit a03da61

File tree

4 files changed

+18
-15
lines changed

4 files changed

+18
-15
lines changed

src/ExampleNets/regression/ElectrodeCoilSetup.srn5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217
<item>
218218
<moduleId1_>ReadMatrix:2</moduleId1_>
219219
<port1_>
220-
<name>MatrixLoaded</name>
220+
<name>Matrix</name>
221221
<id>0</id>
222222
</port1_>
223223
<moduleId2_>ElectrodeCoilSetup:0</moduleId2_>

src/Interface/Modules/BrainStimulator/ElectrodeCoilSetupDialog.cc

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -355,13 +355,15 @@ void ElectrodeCoilSetupDialog::updateThicknessColumnValues(double value)
355355
for (int i=0; i<electrode_coil_tableWidget->rowCount(); i++)
356356
{
357357
auto item = electrode_coil_tableWidget->item(i, 9);
358-
359-
if (ElectrodethicknessCheckBoxButton)
358+
if (item)
360359
{
361-
electrode_coil_tableWidget->blockSignals(true);
362-
item->setText(text);
363-
electrode_coil_tableWidget->scrollToItem(item);
364-
electrode_coil_tableWidget->blockSignals(false);
360+
if (ElectrodethicknessCheckBoxButton)
361+
{
362+
electrode_coil_tableWidget->blockSignals(true);
363+
item->setText(text);
364+
electrode_coil_tableWidget->scrollToItem(item);
365+
electrode_coil_tableWidget->blockSignals(false);
366+
}
365367
}
366368
}
367369

@@ -376,13 +378,15 @@ void ElectrodeCoilSetupDialog::toggleThicknessColumnReadOnly(int state)
376378
for (int i=0; i<electrode_coil_tableWidget->rowCount(); i++)
377379
{
378380
auto item = electrode_coil_tableWidget->item(i, 9);
379-
380-
if (ElectrodethicknessCheckBoxButton)
381+
if (item)
381382
{
382-
item->setFlags(item->flags() & ~Qt::ItemIsEditable);
383+
if (ElectrodethicknessCheckBoxButton)
384+
{
385+
item->setFlags(item->flags() & ~Qt::ItemIsEditable);
386+
}
387+
else
388+
item->setFlags(item->flags() | Qt::ItemIsEditable);
383389
}
384-
else
385-
item->setFlags(item->flags() | Qt::ItemIsEditable);
386390
}
387391

388392
if (ElectrodethicknessCheckBoxButton)

src/Modules/BrainStimulator/ElectrodeCoilSetup.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
/// The module gets the triangulated scalp surface as the first input and a matrix of possible locations as the second. The third and any following input fields (dynamic input ports)
3737
/// are considered to be prototypes of electrodes or TMS coils that need to be positioned. After the first execution using a minimum of 3 (valid) inputs the positions appear as table rows
3838
/// in the GUI. The GUI allows to assign a prototype (first table column), normal direction etc. as well as the type of stimulation (second table column). Based on the choices made in the
39-
/// first (prototype, "Input #") and second coloumn (stimulation type, "Type") information are gathered from the rest of the row. An defined tDCS electrode or TMS coil will be moved using
39+
/// first (prototype, "Input #") and second column (stimulation type, "Type") information are gathered from the rest of the row. An defined tDCS electrode or TMS coil will be moved using
4040
/// its location ("X","Y","Z"), its normal ("NX","NY","NZ") and can be rotated along its normal by the angle table cell defined in degrees. Throughout this table, multiple electrodes and TMS coils
4141
/// can be located at their final destinations. For a tDCS electrode specification, the placed and oriented prototype (contains electrode dimension) is used to cut the scalp that is covered by the
4242
/// electrode. This piece of scalp and its normals are used to generate the electrode sponge shape by using the thickness table parameter. The module contains three outputs: 1) the averaged scalp
@@ -52,7 +52,6 @@
5252
//////////////////////////////////////////////////////////////////////////
5353
/// @todo MORITZ
5454
//////////////////////////////////////////////////////////////////////////
55-
using namespace SCIRun::Core::Datatypes;
5655

5756
namespace SCIRun {
5857
namespace Modules {

src/Modules/BrainStimulator/Tests/ElectrodeCoilSetupTests.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ TEST_F(ElectrodeCoilSetupTests, ThrowsForNullInput)
5858
stubPortNWithThisData(tdcs, 0, nullField);
5959
stubPortNWithThisData(tdcs, 1, nullField);
6060

61-
EXPECT_THROW(tdcs->execute(), NoHandleOnPortException); //nulls are removed, so should throw "no handle"
61+
EXPECT_THROW(tdcs->execute(), NullHandleOnPortException);
6262
}
6363

6464
TEST_F(ElectrodeCoilSetupTests, DISABLED_Foo)

0 commit comments

Comments
 (0)