1246 |
// (which is supposed to switch between regions) |
// (which is supposed to switch between regions) |
1247 |
if (primaryKeyDown) return false; |
if (primaryKeyDown) return false; |
1248 |
|
|
1249 |
|
// avoid conflict with Alt+Shift+Left and Alt+Shift+Right accelerators on |
1250 |
|
// mainwindow |
1251 |
|
if (shiftKeyDown) return false; |
1252 |
|
|
1253 |
if (key->keyval == GDK_KEY_Left) |
if (key->keyval == GDK_KEY_Left) |
1254 |
select_prev_dimzone(); |
select_prev_dimzone(); |
1255 |
if (key->keyval == GDK_KEY_Right) |
if (key->keyval == GDK_KEY_Right) |
1310 |
return false; //.selection failed |
return false; //.selection failed |
1311 |
} |
} |
1312 |
|
|
1313 |
void DimRegionChooser::select_next_dimzone() { |
void DimRegionChooser::select_next_dimzone(bool add) { |
1314 |
select_dimzone_by_dir(+1); |
select_dimzone_by_dir(+1, add); |
1315 |
} |
} |
1316 |
|
|
1317 |
void DimRegionChooser::select_prev_dimzone() { |
void DimRegionChooser::select_prev_dimzone(bool add) { |
1318 |
select_dimzone_by_dir(-1); |
select_dimzone_by_dir(-1, add); |
1319 |
} |
} |
1320 |
|
|
1321 |
void DimRegionChooser::select_dimzone_by_dir(int dir) { |
void DimRegionChooser::select_dimzone_by_dir(int dir, bool add) { |
1322 |
if (!region) return; |
if (!region) return; |
1323 |
if (!region->Dimensions) return; |
if (!region->Dimensions) return; |
1324 |
if (focus_line < 0) focus_line = 0; |
if (focus_line < 0) focus_line = 0; |
1353 |
|
|
1354 |
maindimregno = getDimensionRegionIndex(dr); |
maindimregno = getDimensionRegionIndex(dr); |
1355 |
|
|
1356 |
// reset selected dimregion zones |
if (!add) { |
1357 |
dimzones.clear(); |
// reset selected dimregion zones |
1358 |
|
dimzones.clear(); |
1359 |
|
} |
1360 |
for (DimensionCase::const_iterator it = maindimcase.begin(); |
for (DimensionCase::const_iterator it = maindimcase.begin(); |
1361 |
it != maindimcase.end(); ++it) |
it != maindimcase.end(); ++it) |
1362 |
{ |
{ |